GetDiagnosticCategories

Use this data source to access information about the Monitor Diagnostics Categories supported by an existing Resource.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleKeyVault = Output.Create(Azure.KeyVault.GetKeyVault.InvokeAsync(new Azure.KeyVault.GetKeyVaultArgs
        {
            Name = azurerm_key_vault.Example.Name,
            ResourceGroupName = azurerm_key_vault.Example.Resource_group_name,
        }));
        var exampleDiagnosticCategories = exampleKeyVault.Apply(exampleKeyVault => Output.Create(Azure.Monitoring.GetDiagnosticCategories.InvokeAsync(new Azure.Monitoring.GetDiagnosticCategoriesArgs
        {
            ResourceId = exampleKeyVault.Id,
        })));
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/keyvault"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/monitoring"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleKeyVault, err := keyvault.LookupKeyVault(ctx, &keyvault.LookupKeyVaultArgs{
            Name:              azurerm_key_vault.Example.Name,
            ResourceGroupName: azurerm_key_vault.Example.Resource_group_name,
        }, nil)
        if err != nil {
            return err
        }
        _, err := monitoring.GetDiagnosticCategories(ctx, &monitoring.GetDiagnosticCategoriesArgs{
            ResourceId: exampleKeyVault.Id,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_key_vault = azure.keyvault.get_key_vault(name=azurerm_key_vault["example"]["name"],
    resource_group_name=azurerm_key_vault["example"]["resource_group_name"])
example_diagnostic_categories = azure.monitoring.get_diagnostic_categories(resource_id=example_key_vault.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleKeyVault = azure.keyvault.getKeyVault({
    name: azurerm_key_vault.example.name,
    resourceGroupName: azurerm_key_vault.example.resource_group_name,
});
const exampleDiagnosticCategories = exampleKeyVault.then(exampleKeyVault => azure.monitoring.getDiagnosticCategories({
    resourceId: exampleKeyVault.id,
}));

Using GetDiagnosticCategories

function getDiagnosticCategories(args: GetDiagnosticCategoriesArgs, opts?: InvokeOptions): Promise<GetDiagnosticCategoriesResult>
function  get_diagnostic_categories(resource_id=None, opts=None)
func GetDiagnosticCategories(ctx *Context, args *GetDiagnosticCategoriesArgs, opts ...InvokeOption) (*GetDiagnosticCategoriesResult, error)
public static class GetDiagnosticCategories {
    public static Task<GetDiagnosticCategoriesResult> InvokeAsync(GetDiagnosticCategoriesArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ResourceId string

The ID of an existing Resource which Monitor Diagnostics Categories should be retrieved for.

ResourceId string

The ID of an existing Resource which Monitor Diagnostics Categories should be retrieved for.

resourceId string

The ID of an existing Resource which Monitor Diagnostics Categories should be retrieved for.

resource_id str

The ID of an existing Resource which Monitor Diagnostics Categories should be retrieved for.

GetDiagnosticCategories Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Logs List<string>

A list of the Log Categories supported for this Resource.

Metrics List<string>

A list of the Metric Categories supported for this Resource.

ResourceId string
Id string

The provider-assigned unique ID for this managed resource.

Logs []string

A list of the Log Categories supported for this Resource.

Metrics []string

A list of the Metric Categories supported for this Resource.

ResourceId string
id string

The provider-assigned unique ID for this managed resource.

logs string[]

A list of the Log Categories supported for this Resource.

metrics string[]

A list of the Metric Categories supported for this Resource.

resourceId string
id str

The provider-assigned unique ID for this managed resource.

logs List[str]

A list of the Log Categories supported for this Resource.

metrics List[str]

A list of the Metric Categories supported for this Resource.

resource_id str

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.