1. Packages
  2. Azure Native
  3. API Docs
  4. monitor
  5. getDiscoveryRule
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.10.1 published on Friday, Nov 7, 2025 by Pulumi
azure-native logo
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.10.1 published on Friday, Nov 7, 2025 by Pulumi

    Get a DiscoveryRule

    Uses Azure REST API version 2025-05-03-preview.

    Using getDiscoveryRule

    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 getDiscoveryRule(args: GetDiscoveryRuleArgs, opts?: InvokeOptions): Promise<GetDiscoveryRuleResult>
    function getDiscoveryRuleOutput(args: GetDiscoveryRuleOutputArgs, opts?: InvokeOptions): Output<GetDiscoveryRuleResult>
    def get_discovery_rule(azure_monitor_workspace_name: Optional[str] = None,
                           discovery_rule_name: Optional[str] = None,
                           health_model_name: Optional[str] = None,
                           resource_group_name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetDiscoveryRuleResult
    def get_discovery_rule_output(azure_monitor_workspace_name: Optional[pulumi.Input[str]] = None,
                           discovery_rule_name: Optional[pulumi.Input[str]] = None,
                           health_model_name: Optional[pulumi.Input[str]] = None,
                           resource_group_name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetDiscoveryRuleResult]
    func LookupDiscoveryRule(ctx *Context, args *LookupDiscoveryRuleArgs, opts ...InvokeOption) (*LookupDiscoveryRuleResult, error)
    func LookupDiscoveryRuleOutput(ctx *Context, args *LookupDiscoveryRuleOutputArgs, opts ...InvokeOption) LookupDiscoveryRuleResultOutput

    > Note: This function is named LookupDiscoveryRule in the Go SDK.

    public static class GetDiscoveryRule 
    {
        public static Task<GetDiscoveryRuleResult> InvokeAsync(GetDiscoveryRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetDiscoveryRuleResult> Invoke(GetDiscoveryRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDiscoveryRuleResult> getDiscoveryRule(GetDiscoveryRuleArgs args, InvokeOptions options)
    public static Output<GetDiscoveryRuleResult> getDiscoveryRule(GetDiscoveryRuleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure-native:monitor:getDiscoveryRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AzureMonitorWorkspaceName string
    The name of the Azure Monitor Workspace. The name is case insensitive
    DiscoveryRuleName string
    Name of the discovery rule. Must be unique within a health model.
    HealthModelName string
    Name of health model resource
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    AzureMonitorWorkspaceName string
    The name of the Azure Monitor Workspace. The name is case insensitive
    DiscoveryRuleName string
    Name of the discovery rule. Must be unique within a health model.
    HealthModelName string
    Name of health model resource
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    azureMonitorWorkspaceName String
    The name of the Azure Monitor Workspace. The name is case insensitive
    discoveryRuleName String
    Name of the discovery rule. Must be unique within a health model.
    healthModelName String
    Name of health model resource
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    azureMonitorWorkspaceName string
    The name of the Azure Monitor Workspace. The name is case insensitive
    discoveryRuleName string
    Name of the discovery rule. Must be unique within a health model.
    healthModelName string
    Name of health model resource
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    azure_monitor_workspace_name str
    The name of the Azure Monitor Workspace. The name is case insensitive
    discovery_rule_name str
    Name of the discovery rule. Must be unique within a health model.
    health_model_name str
    Name of health model resource
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    azureMonitorWorkspaceName String
    The name of the Azure Monitor Workspace. The name is case insensitive
    discoveryRuleName String
    Name of the discovery rule. Must be unique within a health model.
    healthModelName String
    Name of health model resource
    resourceGroupName String
    The name of the resource group. The name is case insensitive.

    getDiscoveryRule Result

    The following output properties are available:

    AzureApiVersion string
    The Azure API version of the resource.
    Id string
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    Name string
    The name of the resource
    Properties Pulumi.AzureNative.Monitor.Outputs.ApplicationInsightsTopologyDiscoveryRulePropertiesResponse | Pulumi.AzureNative.Monitor.Outputs.ResourceGraphQueryDiscoveryRulePropertiesResponse
    The resource-specific properties for this resource.
    SystemData Pulumi.AzureNative.Monitor.Outputs.SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    AzureApiVersion string
    The Azure API version of the resource.
    Id string
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    Name string
    The name of the resource
    Properties ApplicationInsightsTopologyDiscoveryRulePropertiesResponse | ResourceGraphQueryDiscoveryRulePropertiesResponse
    The resource-specific properties for this resource.
    SystemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azureApiVersion String
    The Azure API version of the resource.
    id String
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    name String
    The name of the resource
    properties ApplicationInsightsTopologyDiscoveryRulePropertiesResponse | ResourceGraphQueryDiscoveryRulePropertiesResponse
    The resource-specific properties for this resource.
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azureApiVersion string
    The Azure API version of the resource.
    id string
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    name string
    The name of the resource
    properties ApplicationInsightsTopologyDiscoveryRulePropertiesResponse | ResourceGraphQueryDiscoveryRulePropertiesResponse
    The resource-specific properties for this resource.
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azure_api_version str
    The Azure API version of the resource.
    id str
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    name str
    The name of the resource
    properties ApplicationInsightsTopologyDiscoveryRulePropertiesResponse | ResourceGraphQueryDiscoveryRulePropertiesResponse
    The resource-specific properties for this resource.
    system_data SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azureApiVersion String
    The Azure API version of the resource.
    id String
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    name String
    The name of the resource
    properties Property Map | Property Map
    The resource-specific properties for this resource.
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

    Supporting Types

    ApplicationInsightsTopologyDiscoveryRulePropertiesResponse

    AddRecommendedSignals string
    Whether to add all recommended signals to the discovered entities.
    ApplicationInsightsResourceId string
    Application Insights resource ID
    AuthenticationSetting string
    Reference to the name of the authentication setting which is used for querying Azure Resource Graph. The same authentication setting will also be assigned to any discovered entities.
    DeletionDate string
    Date when the discovery rule was (soft-)deleted.
    DiscoverRelationships string
    Whether to create relationships between the discovered entities based on a set of built-in rules. These relationships cannot be manually deleted.
    EntityName string
    Name of the entity which represents the discovery rule. Note: It might take a few minutes after creating the discovery rule until the entity is created.
    Error Pulumi.AzureNative.Monitor.Inputs.DiscoveryErrorResponse
    Error details if the last discovery operation failed.
    ProvisioningState string
    The status of the last operation.
    DisplayName string
    Display name
    AddRecommendedSignals string
    Whether to add all recommended signals to the discovered entities.
    ApplicationInsightsResourceId string
    Application Insights resource ID
    AuthenticationSetting string
    Reference to the name of the authentication setting which is used for querying Azure Resource Graph. The same authentication setting will also be assigned to any discovered entities.
    DeletionDate string
    Date when the discovery rule was (soft-)deleted.
    DiscoverRelationships string
    Whether to create relationships between the discovered entities based on a set of built-in rules. These relationships cannot be manually deleted.
    EntityName string
    Name of the entity which represents the discovery rule. Note: It might take a few minutes after creating the discovery rule until the entity is created.
    Error DiscoveryErrorResponse
    Error details if the last discovery operation failed.
    ProvisioningState string
    The status of the last operation.
    DisplayName string
    Display name
    addRecommendedSignals String
    Whether to add all recommended signals to the discovered entities.
    applicationInsightsResourceId String
    Application Insights resource ID
    authenticationSetting String
    Reference to the name of the authentication setting which is used for querying Azure Resource Graph. The same authentication setting will also be assigned to any discovered entities.
    deletionDate String
    Date when the discovery rule was (soft-)deleted.
    discoverRelationships String
    Whether to create relationships between the discovered entities based on a set of built-in rules. These relationships cannot be manually deleted.
    entityName String
    Name of the entity which represents the discovery rule. Note: It might take a few minutes after creating the discovery rule until the entity is created.
    error DiscoveryErrorResponse
    Error details if the last discovery operation failed.
    provisioningState String
    The status of the last operation.
    displayName String
    Display name
    addRecommendedSignals string
    Whether to add all recommended signals to the discovered entities.
    applicationInsightsResourceId string
    Application Insights resource ID
    authenticationSetting string
    Reference to the name of the authentication setting which is used for querying Azure Resource Graph. The same authentication setting will also be assigned to any discovered entities.
    deletionDate string
    Date when the discovery rule was (soft-)deleted.
    discoverRelationships string
    Whether to create relationships between the discovered entities based on a set of built-in rules. These relationships cannot be manually deleted.
    entityName string
    Name of the entity which represents the discovery rule. Note: It might take a few minutes after creating the discovery rule until the entity is created.
    error DiscoveryErrorResponse
    Error details if the last discovery operation failed.
    provisioningState string
    The status of the last operation.
    displayName string
    Display name
    add_recommended_signals str
    Whether to add all recommended signals to the discovered entities.
    application_insights_resource_id str
    Application Insights resource ID
    authentication_setting str
    Reference to the name of the authentication setting which is used for querying Azure Resource Graph. The same authentication setting will also be assigned to any discovered entities.
    deletion_date str
    Date when the discovery rule was (soft-)deleted.
    discover_relationships str
    Whether to create relationships between the discovered entities based on a set of built-in rules. These relationships cannot be manually deleted.
    entity_name str
    Name of the entity which represents the discovery rule. Note: It might take a few minutes after creating the discovery rule until the entity is created.
    error DiscoveryErrorResponse
    Error details if the last discovery operation failed.
    provisioning_state str
    The status of the last operation.
    display_name str
    Display name
    addRecommendedSignals String
    Whether to add all recommended signals to the discovered entities.
    applicationInsightsResourceId String
    Application Insights resource ID
    authenticationSetting String
    Reference to the name of the authentication setting which is used for querying Azure Resource Graph. The same authentication setting will also be assigned to any discovered entities.
    deletionDate String
    Date when the discovery rule was (soft-)deleted.
    discoverRelationships String
    Whether to create relationships between the discovered entities based on a set of built-in rules. These relationships cannot be manually deleted.
    entityName String
    Name of the entity which represents the discovery rule. Note: It might take a few minutes after creating the discovery rule until the entity is created.
    error Property Map
    Error details if the last discovery operation failed.
    provisioningState String
    The status of the last operation.
    displayName String
    Display name

    DiscoveryErrorResponse

    Context List<string>
    Additional context information, like resource IDs or query details
    Message string
    Error message
    Context []string
    Additional context information, like resource IDs or query details
    Message string
    Error message
    context List<String>
    Additional context information, like resource IDs or query details
    message String
    Error message
    context string[]
    Additional context information, like resource IDs or query details
    message string
    Error message
    context Sequence[str]
    Additional context information, like resource IDs or query details
    message str
    Error message
    context List<String>
    Additional context information, like resource IDs or query details
    message String
    Error message

    ResourceGraphQueryDiscoveryRulePropertiesResponse

    AddRecommendedSignals string
    Whether to add all recommended signals to the discovered entities.
    AuthenticationSetting string
    Reference to the name of the authentication setting which is used for querying Azure Resource Graph. The same authentication setting will also be assigned to any discovered entities.
    DeletionDate string
    Date when the discovery rule was (soft-)deleted.
    DiscoverRelationships string
    Whether to create relationships between the discovered entities based on a set of built-in rules. These relationships cannot be manually deleted.
    EntityName string
    Name of the entity which represents the discovery rule. Note: It might take a few minutes after creating the discovery rule until the entity is created.
    Error Pulumi.AzureNative.Monitor.Inputs.DiscoveryErrorResponse
    Error details if the last discovery operation failed.
    ProvisioningState string
    The status of the last operation.
    ResourceGraphQuery string
    Azure Resource Graph query text in KQL syntax. The query must return at least a column named 'id' which contains the resource ID of the discovered resources.
    DisplayName string
    Display name
    AddRecommendedSignals string
    Whether to add all recommended signals to the discovered entities.
    AuthenticationSetting string
    Reference to the name of the authentication setting which is used for querying Azure Resource Graph. The same authentication setting will also be assigned to any discovered entities.
    DeletionDate string
    Date when the discovery rule was (soft-)deleted.
    DiscoverRelationships string
    Whether to create relationships between the discovered entities based on a set of built-in rules. These relationships cannot be manually deleted.
    EntityName string
    Name of the entity which represents the discovery rule. Note: It might take a few minutes after creating the discovery rule until the entity is created.
    Error DiscoveryErrorResponse
    Error details if the last discovery operation failed.
    ProvisioningState string
    The status of the last operation.
    ResourceGraphQuery string
    Azure Resource Graph query text in KQL syntax. The query must return at least a column named 'id' which contains the resource ID of the discovered resources.
    DisplayName string
    Display name
    addRecommendedSignals String
    Whether to add all recommended signals to the discovered entities.
    authenticationSetting String
    Reference to the name of the authentication setting which is used for querying Azure Resource Graph. The same authentication setting will also be assigned to any discovered entities.
    deletionDate String
    Date when the discovery rule was (soft-)deleted.
    discoverRelationships String
    Whether to create relationships between the discovered entities based on a set of built-in rules. These relationships cannot be manually deleted.
    entityName String
    Name of the entity which represents the discovery rule. Note: It might take a few minutes after creating the discovery rule until the entity is created.
    error DiscoveryErrorResponse
    Error details if the last discovery operation failed.
    provisioningState String
    The status of the last operation.
    resourceGraphQuery String
    Azure Resource Graph query text in KQL syntax. The query must return at least a column named 'id' which contains the resource ID of the discovered resources.
    displayName String
    Display name
    addRecommendedSignals string
    Whether to add all recommended signals to the discovered entities.
    authenticationSetting string
    Reference to the name of the authentication setting which is used for querying Azure Resource Graph. The same authentication setting will also be assigned to any discovered entities.
    deletionDate string
    Date when the discovery rule was (soft-)deleted.
    discoverRelationships string
    Whether to create relationships between the discovered entities based on a set of built-in rules. These relationships cannot be manually deleted.
    entityName string
    Name of the entity which represents the discovery rule. Note: It might take a few minutes after creating the discovery rule until the entity is created.
    error DiscoveryErrorResponse
    Error details if the last discovery operation failed.
    provisioningState string
    The status of the last operation.
    resourceGraphQuery string
    Azure Resource Graph query text in KQL syntax. The query must return at least a column named 'id' which contains the resource ID of the discovered resources.
    displayName string
    Display name
    add_recommended_signals str
    Whether to add all recommended signals to the discovered entities.
    authentication_setting str
    Reference to the name of the authentication setting which is used for querying Azure Resource Graph. The same authentication setting will also be assigned to any discovered entities.
    deletion_date str
    Date when the discovery rule was (soft-)deleted.
    discover_relationships str
    Whether to create relationships between the discovered entities based on a set of built-in rules. These relationships cannot be manually deleted.
    entity_name str
    Name of the entity which represents the discovery rule. Note: It might take a few minutes after creating the discovery rule until the entity is created.
    error DiscoveryErrorResponse
    Error details if the last discovery operation failed.
    provisioning_state str
    The status of the last operation.
    resource_graph_query str
    Azure Resource Graph query text in KQL syntax. The query must return at least a column named 'id' which contains the resource ID of the discovered resources.
    display_name str
    Display name
    addRecommendedSignals String
    Whether to add all recommended signals to the discovered entities.
    authenticationSetting String
    Reference to the name of the authentication setting which is used for querying Azure Resource Graph. The same authentication setting will also be assigned to any discovered entities.
    deletionDate String
    Date when the discovery rule was (soft-)deleted.
    discoverRelationships String
    Whether to create relationships between the discovered entities based on a set of built-in rules. These relationships cannot be manually deleted.
    entityName String
    Name of the entity which represents the discovery rule. Note: It might take a few minutes after creating the discovery rule until the entity is created.
    error Property Map
    Error details if the last discovery operation failed.
    provisioningState String
    The status of the last operation.
    resourceGraphQuery String
    Azure Resource Graph query text in KQL syntax. The query must return at least a column named 'id' which contains the resource ID of the discovered resources.
    displayName String
    Display name

    SystemDataResponse

    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    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.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    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.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    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.
    createdByType string
    The type of identity that created the resource.
    lastModifiedAt string
    The timestamp of resource last modification (UTC)
    lastModifiedBy string
    The identity that last modified the resource.
    lastModifiedByType string
    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_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    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.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
    Azure Native v3.10.1 published on Friday, Nov 7, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate