This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi
azure-native.insights.getDiagnosticSetting
Explore with Pulumi AI
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi
Gets the active diagnostic settings for the specified resource. Azure REST API version: 2021-05-01-preview.
Using getDiagnosticSetting
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDiagnosticSetting(args: GetDiagnosticSettingArgs, opts?: InvokeOptions): Promise<GetDiagnosticSettingResult>
function getDiagnosticSettingOutput(args: GetDiagnosticSettingOutputArgs, opts?: InvokeOptions): Output<GetDiagnosticSettingResult>def get_diagnostic_setting(name: Optional[str] = None,
                           resource_uri: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetDiagnosticSettingResult
def get_diagnostic_setting_output(name: Optional[pulumi.Input[str]] = None,
                           resource_uri: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetDiagnosticSettingResult]func LookupDiagnosticSetting(ctx *Context, args *LookupDiagnosticSettingArgs, opts ...InvokeOption) (*LookupDiagnosticSettingResult, error)
func LookupDiagnosticSettingOutput(ctx *Context, args *LookupDiagnosticSettingOutputArgs, opts ...InvokeOption) LookupDiagnosticSettingResultOutput> Note: This function is named LookupDiagnosticSetting in the Go SDK.
public static class GetDiagnosticSetting 
{
    public static Task<GetDiagnosticSettingResult> InvokeAsync(GetDiagnosticSettingArgs args, InvokeOptions? opts = null)
    public static Output<GetDiagnosticSettingResult> Invoke(GetDiagnosticSettingInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDiagnosticSettingResult> getDiagnosticSetting(GetDiagnosticSettingArgs args, InvokeOptions options)
public static Output<GetDiagnosticSettingResult> getDiagnosticSetting(GetDiagnosticSettingArgs args, InvokeOptions options)
fn::invoke:
  function: azure-native:insights:getDiagnosticSetting
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the diagnostic setting.
- ResourceUri string
- The identifier of the resource.
- Name string
- The name of the diagnostic setting.
- ResourceUri string
- The identifier of the resource.
- name String
- The name of the diagnostic setting.
- resourceUri String
- The identifier of the resource.
- name string
- The name of the diagnostic setting.
- resourceUri string
- The identifier of the resource.
- name str
- The name of the diagnostic setting.
- resource_uri str
- The identifier of the resource.
- name String
- The name of the diagnostic setting.
- resourceUri String
- The identifier of the resource.
getDiagnosticSetting Result
The following output properties are available:
- Id string
- Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
- Name string
- The name of the resource
- SystemData Pulumi.Azure Native. Insights. Outputs. System Data Response 
- The system metadata related to this resource.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- string
- The resource Id for the event hub authorization rule.
- EventHub stringName 
- The name of the event hub. If none is specified, the default event hub will be selected.
- LogAnalytics stringDestination Type 
- A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)
- Logs
List<Pulumi.Azure Native. Insights. Outputs. Log Settings Response> 
- The list of logs settings.
- MarketplacePartner stringId 
- The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
- Metrics
List<Pulumi.Azure Native. Insights. Outputs. Metric Settings Response> 
- The list of metric settings.
- ServiceBus stringRule Id 
- The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
- StorageAccount stringId 
- The resource ID of the storage account to which you would like to send Diagnostic Logs.
- WorkspaceId string
- 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
- Id string
- Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
- Name string
- The name of the resource
- SystemData SystemData Response 
- The system metadata related to this resource.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- string
- The resource Id for the event hub authorization rule.
- EventHub stringName 
- The name of the event hub. If none is specified, the default event hub will be selected.
- LogAnalytics stringDestination Type 
- A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)
- Logs
[]LogSettings Response 
- The list of logs settings.
- MarketplacePartner stringId 
- The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
- Metrics
[]MetricSettings Response 
- The list of metric settings.
- ServiceBus stringRule Id 
- The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
- StorageAccount stringId 
- The resource ID of the storage account to which you would like to send Diagnostic Logs.
- WorkspaceId string
- 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
- id String
- Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
- name String
- The name of the resource
- systemData SystemData Response 
- The system metadata related to this resource.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- String
- The resource Id for the event hub authorization rule.
- eventHub StringName 
- The name of the event hub. If none is specified, the default event hub will be selected.
- logAnalytics StringDestination Type 
- A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)
- logs
List<LogSettings Response> 
- The list of logs settings.
- marketplacePartner StringId 
- The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
- metrics
List<MetricSettings Response> 
- The list of metric settings.
- serviceBus StringRule Id 
- The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
- storageAccount StringId 
- The resource ID of the storage account to which you would like to send Diagnostic Logs.
- workspaceId String
- 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
- id string
- Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
- name string
- The name of the resource
- systemData SystemData Response 
- The system metadata related to this resource.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- string
- The resource Id for the event hub authorization rule.
- eventHub stringName 
- The name of the event hub. If none is specified, the default event hub will be selected.
- logAnalytics stringDestination Type 
- A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)
- logs
LogSettings Response[] 
- The list of logs settings.
- marketplacePartner stringId 
- The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
- metrics
MetricSettings Response[] 
- The list of metric settings.
- serviceBus stringRule Id 
- The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
- storageAccount stringId 
- The resource ID of the storage account to which you would like to send Diagnostic Logs.
- workspaceId string
- 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
- id str
- Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
- name str
- The name of the resource
- system_data SystemData Response 
- The system metadata related to this resource.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- str
- The resource Id for the event hub authorization rule.
- event_hub_ strname 
- The name of the event hub. If none is specified, the default event hub will be selected.
- log_analytics_ strdestination_ type 
- A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)
- logs
Sequence[LogSettings Response] 
- The list of logs settings.
- marketplace_partner_ strid 
- The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
- metrics
Sequence[MetricSettings Response] 
- The list of metric settings.
- service_bus_ strrule_ id 
- The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
- storage_account_ strid 
- The resource ID of the storage account to which you would like to send Diagnostic Logs.
- workspace_id str
- 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
- id String
- Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
- name String
- The name of the resource
- systemData Property Map
- The system metadata related to this resource.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- String
- The resource Id for the event hub authorization rule.
- eventHub StringName 
- The name of the event hub. If none is specified, the default event hub will be selected.
- logAnalytics StringDestination Type 
- A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)
- logs List<Property Map>
- The list of logs settings.
- marketplacePartner StringId 
- The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
- metrics List<Property Map>
- The list of metric settings.
- serviceBus StringRule Id 
- The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
- storageAccount StringId 
- The resource ID of the storage account to which you would like to send Diagnostic Logs.
- workspaceId String
- 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
Supporting Types
LogSettingsResponse  
- Enabled bool
- a value indicating whether this log is enabled.
- Category string
- Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
- CategoryGroup string
- Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
- RetentionPolicy Pulumi.Azure Native. Insights. Inputs. Retention Policy Response 
- the retention policy for this log.
- Enabled bool
- a value indicating whether this log is enabled.
- Category string
- Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
- CategoryGroup string
- Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
- RetentionPolicy RetentionPolicy Response 
- the retention policy for this log.
- enabled Boolean
- a value indicating whether this log is enabled.
- category String
- Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
- categoryGroup String
- Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
- retentionPolicy RetentionPolicy Response 
- the retention policy for this log.
- enabled boolean
- a value indicating whether this log is enabled.
- category string
- Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
- categoryGroup string
- Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
- retentionPolicy RetentionPolicy Response 
- the retention policy for this log.
- enabled bool
- a value indicating whether this log is enabled.
- category str
- Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
- category_group str
- Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
- retention_policy RetentionPolicy Response 
- the retention policy for this log.
- enabled Boolean
- a value indicating whether this log is enabled.
- category String
- Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
- categoryGroup String
- Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
- retentionPolicy Property Map
- the retention policy for this log.
MetricSettingsResponse  
- Enabled bool
- a value indicating whether this category is enabled.
- Category string
- Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
- RetentionPolicy Pulumi.Azure Native. Insights. Inputs. Retention Policy Response 
- the retention policy for this category.
- TimeGrain string
- the timegrain of the metric in ISO8601 format.
- Enabled bool
- a value indicating whether this category is enabled.
- Category string
- Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
- RetentionPolicy RetentionPolicy Response 
- the retention policy for this category.
- TimeGrain string
- the timegrain of the metric in ISO8601 format.
- enabled Boolean
- a value indicating whether this category is enabled.
- category String
- Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
- retentionPolicy RetentionPolicy Response 
- the retention policy for this category.
- timeGrain String
- the timegrain of the metric in ISO8601 format.
- enabled boolean
- a value indicating whether this category is enabled.
- category string
- Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
- retentionPolicy RetentionPolicy Response 
- the retention policy for this category.
- timeGrain string
- the timegrain of the metric in ISO8601 format.
- enabled bool
- a value indicating whether this category is enabled.
- category str
- Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
- retention_policy RetentionPolicy Response 
- the retention policy for this category.
- time_grain str
- the timegrain of the metric in ISO8601 format.
- enabled Boolean
- a value indicating whether this category is enabled.
- category String
- Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
- retentionPolicy Property Map
- the retention policy for this category.
- timeGrain String
- the timegrain of the metric in ISO8601 format.
RetentionPolicyResponse  
SystemDataResponse  
- CreatedAt string
- The timestamp of resource creation (UTC).
- CreatedBy string
- The identity that created the resource.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- The type of identity that last modified the resource.
- CreatedAt string
- The timestamp of resource creation (UTC).
- CreatedBy string
- The identity that created the resource.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- The type of identity that last modified the resource.
- createdAt String
- The timestamp of resource creation (UTC).
- createdBy String
- The identity that created the resource.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- The type of identity that last modified the resource.
- createdAt string
- The timestamp of resource creation (UTC).
- createdBy string
- The identity that created the resource.
- createdBy stringType 
- The type of identity that created the resource.
- lastModified stringAt 
- The timestamp of resource last modification (UTC)
- lastModified stringBy 
- The identity that last modified the resource.
- lastModified stringBy Type 
- The type of identity that last modified the resource.
- created_at str
- The timestamp of resource creation (UTC).
- created_by str
- The identity that created the resource.
- created_by_ strtype 
- The type of identity that created the resource.
- last_modified_ strat 
- The timestamp of resource last modification (UTC)
- last_modified_ strby 
- The identity that last modified the resource.
- last_modified_ strby_ type 
- The type of identity that last modified the resource.
- createdAt String
- The timestamp of resource creation (UTC).
- createdBy String
- The identity that created the resource.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- The type of identity that last modified the resource.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi