DiagnosticSetting
Manages a Diagnostic Setting for an existing Resource.
Create a DiagnosticSetting Resource
new DiagnosticSetting(name: string, args: DiagnosticSettingArgs, opts?: CustomResourceOptions);def DiagnosticSetting(resource_name, opts=None, eventhub_authorization_rule_id=None, eventhub_name=None, log_analytics_destination_type=None, log_analytics_workspace_id=None, logs=None, metrics=None, name=None, storage_account_id=None, target_resource_id=None, __props__=None);func NewDiagnosticSetting(ctx *Context, name string, args DiagnosticSettingArgs, opts ...ResourceOption) (*DiagnosticSetting, error)public DiagnosticSetting(string name, DiagnosticSettingArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args DiagnosticSettingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DiagnosticSettingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DiagnosticSettingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
DiagnosticSetting Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The DiagnosticSetting resource accepts the following input properties:
- Target
Resource stringId The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- string
Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- Eventhub
Name string Specifies the name of the Event Hub where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- Log
Analytics stringDestination Type When set to ‘Dedicated’ logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.
- Log
Analytics stringWorkspace Id Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- Logs
List<Diagnostic
Setting Log Args> One or more
logblocks as defined below.- Metrics
List<Diagnostic
Setting Metric Args> One or more
metricblocks as defined below.- Name string
Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created.
- Storage
Account stringId 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.
- Target
Resource stringId The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- string
Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- Eventhub
Name string Specifies the name of the Event Hub where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- Log
Analytics stringDestination Type When set to ‘Dedicated’ logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.
- Log
Analytics stringWorkspace Id Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- Logs
[]Diagnostic
Setting Log One or more
logblocks as defined below.- Metrics
[]Diagnostic
Setting Metric One or more
metricblocks as defined below.- Name string
Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created.
- Storage
Account stringId 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.
- target
Resource stringId The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- string
Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- eventhub
Name string Specifies the name of the Event Hub where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- log
Analytics stringDestination Type When set to ‘Dedicated’ logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.
- log
Analytics stringWorkspace Id Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- logs
Diagnostic
Setting Log[] One or more
logblocks as defined below.- metrics
Diagnostic
Setting Metric[] One or more
metricblocks as defined below.- name string
Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created.
- storage
Account stringId 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.
- target_
resource_ strid The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- str
Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- eventhub_
name str Specifies the name of the Event Hub where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- log_
analytics_ strdestination_ type When set to ‘Dedicated’ logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.
- log_
analytics_ strworkspace_ id Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- logs
List[Diagnostic
Setting Log] One or more
logblocks as defined below.- metrics
List[Diagnostic
Setting Metric] One or more
metricblocks as defined below.- name str
Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created.
- storage_
account_ strid 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the DiagnosticSetting resource produces the following output properties:
Look up an Existing DiagnosticSetting Resource
Get an existing DiagnosticSetting resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DiagnosticSettingState, opts?: CustomResourceOptions): DiagnosticSettingstatic get(resource_name, id, opts=None, eventhub_authorization_rule_id=None, eventhub_name=None, log_analytics_destination_type=None, log_analytics_workspace_id=None, logs=None, metrics=None, name=None, storage_account_id=None, target_resource_id=None, __props__=None);func GetDiagnosticSetting(ctx *Context, name string, id IDInput, state *DiagnosticSettingState, opts ...ResourceOption) (*DiagnosticSetting, error)public static DiagnosticSetting Get(string name, Input<string> id, DiagnosticSettingState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- string
Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- Eventhub
Name string Specifies the name of the Event Hub where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- Log
Analytics stringDestination Type When set to ‘Dedicated’ logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.
- Log
Analytics stringWorkspace Id Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- Logs
List<Diagnostic
Setting Log Args> One or more
logblocks as defined below.- Metrics
List<Diagnostic
Setting Metric Args> One or more
metricblocks as defined below.- Name string
Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created.
- Storage
Account stringId 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.
- Target
Resource stringId The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- string
Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- Eventhub
Name string Specifies the name of the Event Hub where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- Log
Analytics stringDestination Type When set to ‘Dedicated’ logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.
- Log
Analytics stringWorkspace Id Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- Logs
[]Diagnostic
Setting Log One or more
logblocks as defined below.- Metrics
[]Diagnostic
Setting Metric One or more
metricblocks as defined below.- Name string
Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created.
- Storage
Account stringId 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.
- Target
Resource stringId The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- string
Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- eventhub
Name string Specifies the name of the Event Hub where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- log
Analytics stringDestination Type When set to ‘Dedicated’ logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.
- log
Analytics stringWorkspace Id Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- logs
Diagnostic
Setting Log[] One or more
logblocks as defined below.- metrics
Diagnostic
Setting Metric[] One or more
metricblocks as defined below.- name string
Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created.
- storage
Account stringId 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.
- target
Resource stringId The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- str
Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- eventhub_
name str Specifies the name of the Event Hub where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- log_
analytics_ strdestination_ type When set to ‘Dedicated’ logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.
- log_
analytics_ strworkspace_ id Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. Changing this forces a new resource to be created.
- logs
List[Diagnostic
Setting Log] One or more
logblocks as defined below.- metrics
List[Diagnostic
Setting Metric] One or more
metricblocks as defined below.- name str
Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created.
- storage_
account_ strid 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.
- target_
resource_ strid The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
Supporting Types
DiagnosticSettingLog
- Category string
The name of a Diagnostic Log Category for this Resource.
- Enabled bool
Is this Diagnostic Log enabled? Defaults to
true.- Retention
Policy DiagnosticSetting Log Retention Policy Args A
retention_policyblock as defined below.
- Category string
The name of a Diagnostic Log Category for this Resource.
- Enabled bool
Is this Diagnostic Log enabled? Defaults to
true.- Retention
Policy DiagnosticSetting Log Retention Policy A
retention_policyblock as defined below.
- category string
The name of a Diagnostic Log Category for this Resource.
- enabled boolean
Is this Diagnostic Log enabled? Defaults to
true.- retention
Policy DiagnosticSetting Log Retention Policy A
retention_policyblock as defined below.
- category str
The name of a Diagnostic Log Category for this Resource.
- enabled bool
Is this Diagnostic Log enabled? Defaults to
true.- retention_
policy Dict[DiagnosticSetting Log Retention Policy] A
retention_policyblock as defined below.
DiagnosticSettingLogRetentionPolicy
DiagnosticSettingMetric
- Category string
The name of a Diagnostic Metric Category for this Resource.
- Enabled bool
Is this Diagnostic Metric enabled? Defaults to
true.- Retention
Policy DiagnosticSetting Metric Retention Policy Args A
retention_policyblock as defined below.
- Category string
The name of a Diagnostic Metric Category for this Resource.
- Enabled bool
Is this Diagnostic Metric enabled? Defaults to
true.- Retention
Policy DiagnosticSetting Metric Retention Policy A
retention_policyblock as defined below.
- category string
The name of a Diagnostic Metric Category for this Resource.
- enabled boolean
Is this Diagnostic Metric enabled? Defaults to
true.- retention
Policy DiagnosticSetting Metric Retention Policy A
retention_policyblock as defined below.
- category str
The name of a Diagnostic Metric Category for this Resource.
- enabled bool
Is this Diagnostic Metric enabled? Defaults to
true.- retention_
policy Dict[DiagnosticSetting Metric Retention Policy] A
retention_policyblock as defined below.
DiagnosticSettingMetricRetentionPolicy
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.