Class DiagnosticSetting
Manages a Diagnostic Setting for an existing Resource.
Inherited Members
Namespace: Pulumi.Azure.Monitoring
Assembly: Pulumi.Azure.dll
Syntax
public class DiagnosticSetting : CustomResource
Constructors
View SourceDiagnosticSetting(String, DiagnosticSettingArgs, CustomResourceOptions)
Create a DiagnosticSetting resource with the given unique name, arguments, and options.
Declaration
public DiagnosticSetting(string name, DiagnosticSettingArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DiagnosticSettingArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceEventhubAuthorizationRuleId
Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
Declaration
public Output<string> EventhubAuthorizationRuleId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EventhubName
Specifies the name of the Event Hub where Diagnostics Data should be sent. Changing this forces a new resource to be created.
Declaration
public Output<string> EventhubName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LogAnalyticsDestinationType
When set to 'Dedicated' logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.
Declaration
public Output<string> LogAnalyticsDestinationType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LogAnalyticsWorkspaceId
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. Changing this forces a new resource to be created.
Declaration
public Output<string> LogAnalyticsWorkspaceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Logs
One or more log blocks as defined below.
Declaration
public Output<ImmutableArray<DiagnosticSettingLog>> Logs { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<DiagnosticSettingLog>> |
Metrics
One or more metric blocks as defined below.
Declaration
public Output<ImmutableArray<DiagnosticSettingMetric>> Metrics { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<DiagnosticSettingMetric>> |
Name
Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StorageAccountId
With this parameter you can specify a storage account which should be used to send the logs to. Parameter must be a valid Azure Resource ID. Changing this forces a new resource to be created.
Declaration
public Output<string> StorageAccountId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TargetResourceId
The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
Declaration
public Output<string> TargetResourceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, DiagnosticSettingState, CustomResourceOptions)
Get an existing DiagnosticSetting resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static DiagnosticSetting Get(string name, Input<string> id, DiagnosticSettingState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DiagnosticSettingState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| DiagnosticSetting |