pulumi-azure-native 3.0.0a1743504154__py3-none-any.whl → 3.1.0a1744014979__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulumi-azure-native might be problematic. Click here for more details.

@@ -0,0 +1,386 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from .. import _utilities
16
+ from . import outputs
17
+ from ._inputs import *
18
+
19
+ __all__ = ['ManagementGroupDiagnosticSettingArgs', 'ManagementGroupDiagnosticSetting']
20
+
21
+ @pulumi.input_type
22
+ class ManagementGroupDiagnosticSettingArgs:
23
+ def __init__(__self__, *,
24
+ management_group_id: pulumi.Input[str],
25
+ event_hub_authorization_rule_id: Optional[pulumi.Input[str]] = None,
26
+ event_hub_name: Optional[pulumi.Input[str]] = None,
27
+ logs: Optional[pulumi.Input[Sequence[pulumi.Input['ManagementGroupLogSettingsArgs']]]] = None,
28
+ marketplace_partner_id: Optional[pulumi.Input[str]] = None,
29
+ name: Optional[pulumi.Input[str]] = None,
30
+ service_bus_rule_id: Optional[pulumi.Input[str]] = None,
31
+ storage_account_id: Optional[pulumi.Input[str]] = None,
32
+ workspace_id: Optional[pulumi.Input[str]] = None):
33
+ """
34
+ The set of arguments for constructing a ManagementGroupDiagnosticSetting resource.
35
+ :param pulumi.Input[str] management_group_id: The management group id.
36
+ :param pulumi.Input[str] event_hub_authorization_rule_id: The resource Id for the event hub authorization rule.
37
+ :param pulumi.Input[str] event_hub_name: The name of the event hub. If none is specified, the default event hub will be selected.
38
+ :param pulumi.Input[Sequence[pulumi.Input['ManagementGroupLogSettingsArgs']]] logs: The list of logs settings.
39
+ :param pulumi.Input[str] marketplace_partner_id: The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
40
+ :param pulumi.Input[str] name: The name of the diagnostic setting.
41
+ :param pulumi.Input[str] service_bus_rule_id: The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
42
+ :param pulumi.Input[str] storage_account_id: The resource ID of the storage account to which you would like to send Diagnostic Logs.
43
+ :param pulumi.Input[str] workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
44
+ """
45
+ pulumi.set(__self__, "management_group_id", management_group_id)
46
+ if event_hub_authorization_rule_id is not None:
47
+ pulumi.set(__self__, "event_hub_authorization_rule_id", event_hub_authorization_rule_id)
48
+ if event_hub_name is not None:
49
+ pulumi.set(__self__, "event_hub_name", event_hub_name)
50
+ if logs is not None:
51
+ pulumi.set(__self__, "logs", logs)
52
+ if marketplace_partner_id is not None:
53
+ pulumi.set(__self__, "marketplace_partner_id", marketplace_partner_id)
54
+ if name is not None:
55
+ pulumi.set(__self__, "name", name)
56
+ if service_bus_rule_id is not None:
57
+ pulumi.set(__self__, "service_bus_rule_id", service_bus_rule_id)
58
+ if storage_account_id is not None:
59
+ pulumi.set(__self__, "storage_account_id", storage_account_id)
60
+ if workspace_id is not None:
61
+ pulumi.set(__self__, "workspace_id", workspace_id)
62
+
63
+ @property
64
+ @pulumi.getter(name="managementGroupId")
65
+ def management_group_id(self) -> pulumi.Input[str]:
66
+ """
67
+ The management group id.
68
+ """
69
+ return pulumi.get(self, "management_group_id")
70
+
71
+ @management_group_id.setter
72
+ def management_group_id(self, value: pulumi.Input[str]):
73
+ pulumi.set(self, "management_group_id", value)
74
+
75
+ @property
76
+ @pulumi.getter(name="eventHubAuthorizationRuleId")
77
+ def event_hub_authorization_rule_id(self) -> Optional[pulumi.Input[str]]:
78
+ """
79
+ The resource Id for the event hub authorization rule.
80
+ """
81
+ return pulumi.get(self, "event_hub_authorization_rule_id")
82
+
83
+ @event_hub_authorization_rule_id.setter
84
+ def event_hub_authorization_rule_id(self, value: Optional[pulumi.Input[str]]):
85
+ pulumi.set(self, "event_hub_authorization_rule_id", value)
86
+
87
+ @property
88
+ @pulumi.getter(name="eventHubName")
89
+ def event_hub_name(self) -> Optional[pulumi.Input[str]]:
90
+ """
91
+ The name of the event hub. If none is specified, the default event hub will be selected.
92
+ """
93
+ return pulumi.get(self, "event_hub_name")
94
+
95
+ @event_hub_name.setter
96
+ def event_hub_name(self, value: Optional[pulumi.Input[str]]):
97
+ pulumi.set(self, "event_hub_name", value)
98
+
99
+ @property
100
+ @pulumi.getter
101
+ def logs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ManagementGroupLogSettingsArgs']]]]:
102
+ """
103
+ The list of logs settings.
104
+ """
105
+ return pulumi.get(self, "logs")
106
+
107
+ @logs.setter
108
+ def logs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ManagementGroupLogSettingsArgs']]]]):
109
+ pulumi.set(self, "logs", value)
110
+
111
+ @property
112
+ @pulumi.getter(name="marketplacePartnerId")
113
+ def marketplace_partner_id(self) -> Optional[pulumi.Input[str]]:
114
+ """
115
+ The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
116
+ """
117
+ return pulumi.get(self, "marketplace_partner_id")
118
+
119
+ @marketplace_partner_id.setter
120
+ def marketplace_partner_id(self, value: Optional[pulumi.Input[str]]):
121
+ pulumi.set(self, "marketplace_partner_id", value)
122
+
123
+ @property
124
+ @pulumi.getter
125
+ def name(self) -> Optional[pulumi.Input[str]]:
126
+ """
127
+ The name of the diagnostic setting.
128
+ """
129
+ return pulumi.get(self, "name")
130
+
131
+ @name.setter
132
+ def name(self, value: Optional[pulumi.Input[str]]):
133
+ pulumi.set(self, "name", value)
134
+
135
+ @property
136
+ @pulumi.getter(name="serviceBusRuleId")
137
+ def service_bus_rule_id(self) -> Optional[pulumi.Input[str]]:
138
+ """
139
+ The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
140
+ """
141
+ return pulumi.get(self, "service_bus_rule_id")
142
+
143
+ @service_bus_rule_id.setter
144
+ def service_bus_rule_id(self, value: Optional[pulumi.Input[str]]):
145
+ pulumi.set(self, "service_bus_rule_id", value)
146
+
147
+ @property
148
+ @pulumi.getter(name="storageAccountId")
149
+ def storage_account_id(self) -> Optional[pulumi.Input[str]]:
150
+ """
151
+ The resource ID of the storage account to which you would like to send Diagnostic Logs.
152
+ """
153
+ return pulumi.get(self, "storage_account_id")
154
+
155
+ @storage_account_id.setter
156
+ def storage_account_id(self, value: Optional[pulumi.Input[str]]):
157
+ pulumi.set(self, "storage_account_id", value)
158
+
159
+ @property
160
+ @pulumi.getter(name="workspaceId")
161
+ def workspace_id(self) -> Optional[pulumi.Input[str]]:
162
+ """
163
+ The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
164
+ """
165
+ return pulumi.get(self, "workspace_id")
166
+
167
+ @workspace_id.setter
168
+ def workspace_id(self, value: Optional[pulumi.Input[str]]):
169
+ pulumi.set(self, "workspace_id", value)
170
+
171
+
172
+ class ManagementGroupDiagnosticSetting(pulumi.CustomResource):
173
+ @overload
174
+ def __init__(__self__,
175
+ resource_name: str,
176
+ opts: Optional[pulumi.ResourceOptions] = None,
177
+ event_hub_authorization_rule_id: Optional[pulumi.Input[str]] = None,
178
+ event_hub_name: Optional[pulumi.Input[str]] = None,
179
+ logs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ManagementGroupLogSettingsArgs', 'ManagementGroupLogSettingsArgsDict']]]]] = None,
180
+ management_group_id: Optional[pulumi.Input[str]] = None,
181
+ marketplace_partner_id: Optional[pulumi.Input[str]] = None,
182
+ name: Optional[pulumi.Input[str]] = None,
183
+ service_bus_rule_id: Optional[pulumi.Input[str]] = None,
184
+ storage_account_id: Optional[pulumi.Input[str]] = None,
185
+ workspace_id: Optional[pulumi.Input[str]] = None,
186
+ __props__=None):
187
+ """
188
+ The management group diagnostic setting resource.
189
+
190
+ Uses Azure REST API version 2021-05-01-preview.
191
+
192
+ :param str resource_name: The name of the resource.
193
+ :param pulumi.ResourceOptions opts: Options for the resource.
194
+ :param pulumi.Input[str] event_hub_authorization_rule_id: The resource Id for the event hub authorization rule.
195
+ :param pulumi.Input[str] event_hub_name: The name of the event hub. If none is specified, the default event hub will be selected.
196
+ :param pulumi.Input[Sequence[pulumi.Input[Union['ManagementGroupLogSettingsArgs', 'ManagementGroupLogSettingsArgsDict']]]] logs: The list of logs settings.
197
+ :param pulumi.Input[str] management_group_id: The management group id.
198
+ :param pulumi.Input[str] marketplace_partner_id: The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
199
+ :param pulumi.Input[str] name: The name of the diagnostic setting.
200
+ :param pulumi.Input[str] service_bus_rule_id: The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
201
+ :param pulumi.Input[str] storage_account_id: The resource ID of the storage account to which you would like to send Diagnostic Logs.
202
+ :param pulumi.Input[str] workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
203
+ """
204
+ ...
205
+ @overload
206
+ def __init__(__self__,
207
+ resource_name: str,
208
+ args: ManagementGroupDiagnosticSettingArgs,
209
+ opts: Optional[pulumi.ResourceOptions] = None):
210
+ """
211
+ The management group diagnostic setting resource.
212
+
213
+ Uses Azure REST API version 2021-05-01-preview.
214
+
215
+ :param str resource_name: The name of the resource.
216
+ :param ManagementGroupDiagnosticSettingArgs args: The arguments to use to populate this resource's properties.
217
+ :param pulumi.ResourceOptions opts: Options for the resource.
218
+ """
219
+ ...
220
+ def __init__(__self__, resource_name: str, *args, **kwargs):
221
+ resource_args, opts = _utilities.get_resource_args_opts(ManagementGroupDiagnosticSettingArgs, pulumi.ResourceOptions, *args, **kwargs)
222
+ if resource_args is not None:
223
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
224
+ else:
225
+ __self__._internal_init(resource_name, *args, **kwargs)
226
+
227
+ def _internal_init(__self__,
228
+ resource_name: str,
229
+ opts: Optional[pulumi.ResourceOptions] = None,
230
+ event_hub_authorization_rule_id: Optional[pulumi.Input[str]] = None,
231
+ event_hub_name: Optional[pulumi.Input[str]] = None,
232
+ logs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ManagementGroupLogSettingsArgs', 'ManagementGroupLogSettingsArgsDict']]]]] = None,
233
+ management_group_id: Optional[pulumi.Input[str]] = None,
234
+ marketplace_partner_id: Optional[pulumi.Input[str]] = None,
235
+ name: Optional[pulumi.Input[str]] = None,
236
+ service_bus_rule_id: Optional[pulumi.Input[str]] = None,
237
+ storage_account_id: Optional[pulumi.Input[str]] = None,
238
+ workspace_id: Optional[pulumi.Input[str]] = None,
239
+ __props__=None):
240
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
241
+ if not isinstance(opts, pulumi.ResourceOptions):
242
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
243
+ if opts.id is None:
244
+ if __props__ is not None:
245
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
246
+ __props__ = ManagementGroupDiagnosticSettingArgs.__new__(ManagementGroupDiagnosticSettingArgs)
247
+
248
+ __props__.__dict__["event_hub_authorization_rule_id"] = event_hub_authorization_rule_id
249
+ __props__.__dict__["event_hub_name"] = event_hub_name
250
+ __props__.__dict__["logs"] = logs
251
+ if management_group_id is None and not opts.urn:
252
+ raise TypeError("Missing required property 'management_group_id'")
253
+ __props__.__dict__["management_group_id"] = management_group_id
254
+ __props__.__dict__["marketplace_partner_id"] = marketplace_partner_id
255
+ __props__.__dict__["name"] = name
256
+ __props__.__dict__["service_bus_rule_id"] = service_bus_rule_id
257
+ __props__.__dict__["storage_account_id"] = storage_account_id
258
+ __props__.__dict__["workspace_id"] = workspace_id
259
+ __props__.__dict__["azure_api_version"] = None
260
+ __props__.__dict__["system_data"] = None
261
+ __props__.__dict__["type"] = None
262
+ alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="azure-native:insights/v20200101preview:ManagementGroupDiagnosticSetting"), pulumi.Alias(type_="azure-native:insights/v20210501preview:ManagementGroupDiagnosticSetting"), pulumi.Alias(type_="azure-native:insights:ManagementGroupDiagnosticSetting"), pulumi.Alias(type_="azure-native:monitor/v20200101preview:ManagementGroupDiagnosticSetting"), pulumi.Alias(type_="azure-native:monitor/v20210501preview:ManagementGroupDiagnosticSetting")])
263
+ opts = pulumi.ResourceOptions.merge(opts, alias_opts)
264
+ super(ManagementGroupDiagnosticSetting, __self__).__init__(
265
+ 'azure-native:monitor:ManagementGroupDiagnosticSetting',
266
+ resource_name,
267
+ __props__,
268
+ opts)
269
+
270
+ @staticmethod
271
+ def get(resource_name: str,
272
+ id: pulumi.Input[str],
273
+ opts: Optional[pulumi.ResourceOptions] = None) -> 'ManagementGroupDiagnosticSetting':
274
+ """
275
+ Get an existing ManagementGroupDiagnosticSetting resource's state with the given name, id, and optional extra
276
+ properties used to qualify the lookup.
277
+
278
+ :param str resource_name: The unique name of the resulting resource.
279
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
280
+ :param pulumi.ResourceOptions opts: Options for the resource.
281
+ """
282
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
283
+
284
+ __props__ = ManagementGroupDiagnosticSettingArgs.__new__(ManagementGroupDiagnosticSettingArgs)
285
+
286
+ __props__.__dict__["azure_api_version"] = None
287
+ __props__.__dict__["event_hub_authorization_rule_id"] = None
288
+ __props__.__dict__["event_hub_name"] = None
289
+ __props__.__dict__["logs"] = None
290
+ __props__.__dict__["marketplace_partner_id"] = None
291
+ __props__.__dict__["name"] = None
292
+ __props__.__dict__["service_bus_rule_id"] = None
293
+ __props__.__dict__["storage_account_id"] = None
294
+ __props__.__dict__["system_data"] = None
295
+ __props__.__dict__["type"] = None
296
+ __props__.__dict__["workspace_id"] = None
297
+ return ManagementGroupDiagnosticSetting(resource_name, opts=opts, __props__=__props__)
298
+
299
+ @property
300
+ @pulumi.getter(name="azureApiVersion")
301
+ def azure_api_version(self) -> pulumi.Output[str]:
302
+ """
303
+ The Azure API version of the resource.
304
+ """
305
+ return pulumi.get(self, "azure_api_version")
306
+
307
+ @property
308
+ @pulumi.getter(name="eventHubAuthorizationRuleId")
309
+ def event_hub_authorization_rule_id(self) -> pulumi.Output[Optional[str]]:
310
+ """
311
+ The resource Id for the event hub authorization rule.
312
+ """
313
+ return pulumi.get(self, "event_hub_authorization_rule_id")
314
+
315
+ @property
316
+ @pulumi.getter(name="eventHubName")
317
+ def event_hub_name(self) -> pulumi.Output[Optional[str]]:
318
+ """
319
+ The name of the event hub. If none is specified, the default event hub will be selected.
320
+ """
321
+ return pulumi.get(self, "event_hub_name")
322
+
323
+ @property
324
+ @pulumi.getter
325
+ def logs(self) -> pulumi.Output[Optional[Sequence['outputs.ManagementGroupLogSettingsResponse']]]:
326
+ """
327
+ The list of logs settings.
328
+ """
329
+ return pulumi.get(self, "logs")
330
+
331
+ @property
332
+ @pulumi.getter(name="marketplacePartnerId")
333
+ def marketplace_partner_id(self) -> pulumi.Output[Optional[str]]:
334
+ """
335
+ The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
336
+ """
337
+ return pulumi.get(self, "marketplace_partner_id")
338
+
339
+ @property
340
+ @pulumi.getter
341
+ def name(self) -> pulumi.Output[str]:
342
+ """
343
+ The name of the resource
344
+ """
345
+ return pulumi.get(self, "name")
346
+
347
+ @property
348
+ @pulumi.getter(name="serviceBusRuleId")
349
+ def service_bus_rule_id(self) -> pulumi.Output[Optional[str]]:
350
+ """
351
+ The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
352
+ """
353
+ return pulumi.get(self, "service_bus_rule_id")
354
+
355
+ @property
356
+ @pulumi.getter(name="storageAccountId")
357
+ def storage_account_id(self) -> pulumi.Output[Optional[str]]:
358
+ """
359
+ The resource ID of the storage account to which you would like to send Diagnostic Logs.
360
+ """
361
+ return pulumi.get(self, "storage_account_id")
362
+
363
+ @property
364
+ @pulumi.getter(name="systemData")
365
+ def system_data(self) -> pulumi.Output['outputs.SystemDataResponse']:
366
+ """
367
+ The system metadata related to this resource.
368
+ """
369
+ return pulumi.get(self, "system_data")
370
+
371
+ @property
372
+ @pulumi.getter
373
+ def type(self) -> pulumi.Output[str]:
374
+ """
375
+ The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
376
+ """
377
+ return pulumi.get(self, "type")
378
+
379
+ @property
380
+ @pulumi.getter(name="workspaceId")
381
+ def workspace_id(self) -> pulumi.Output[Optional[str]]:
382
+ """
383
+ The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
384
+ """
385
+ return pulumi.get(self, "workspace_id")
386
+