GetLogProfile

Use this data source to access the properties of a Log Profile.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Monitoring.GetLogProfile.InvokeAsync(new Azure.Monitoring.GetLogProfileArgs
        {
            Name = "test-logprofile",
        }));
        this.LogProfileStorageAccountId = example.Apply(example => example.StorageAccountId);
    }

    [Output("logProfileStorageAccountId")]
    public Output<string> LogProfileStorageAccountId { get; set; }
}
package main

import (
    "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 {
        example, err := monitoring.LookupLogProfile(ctx, &monitoring.LookupLogProfileArgs{
            Name: "test-logprofile",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("logProfileStorageAccountId", example.StorageAccountId)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.monitoring.get_log_profile(name="test-logprofile")
pulumi.export("logProfileStorageAccountId", example.storage_account_id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.monitoring.getLogProfile({
    name: "test-logprofile",
});
export const logProfileStorageAccountId = example.then(example => example.storageAccountId);

Using GetLogProfile

function getLogProfile(args: GetLogProfileArgs, opts?: InvokeOptions): Promise<GetLogProfileResult>
function  get_log_profile(name=None, opts=None)
func LookupLogProfile(ctx *Context, args *LookupLogProfileArgs, opts ...InvokeOption) (*LookupLogProfileResult, error)

Note: This function is named LookupLogProfile in the Go SDK.

public static class GetLogProfile {
    public static Task<GetLogProfileResult> InvokeAsync(GetLogProfileArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

Specifies the Name of the Log Profile.

Name string

Specifies the Name of the Log Profile.

name string

Specifies the Name of the Log Profile.

name str

Specifies the Name of the Log Profile.

GetLogProfile Result

The following output properties are available:

Categories List<string>

List of categories of the logs.

Id string

The provider-assigned unique ID for this managed resource.

Locations List<string>

List of regions for which Activity Log events are stored or streamed.

Name string
RetentionPolicies List<GetLogProfileRetentionPolicy>
ServicebusRuleId string

The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to.

StorageAccountId string

The resource id of the storage account in which the Activity Log is stored.

Categories []string

List of categories of the logs.

Id string

The provider-assigned unique ID for this managed resource.

Locations []string

List of regions for which Activity Log events are stored or streamed.

Name string
RetentionPolicies []GetLogProfileRetentionPolicy
ServicebusRuleId string

The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to.

StorageAccountId string

The resource id of the storage account in which the Activity Log is stored.

categories string[]

List of categories of the logs.

id string

The provider-assigned unique ID for this managed resource.

locations string[]

List of regions for which Activity Log events are stored or streamed.

name string
retentionPolicies GetLogProfileRetentionPolicy[]
servicebusRuleId string

The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to.

storageAccountId string

The resource id of the storage account in which the Activity Log is stored.

categories List[str]

List of categories of the logs.

id str

The provider-assigned unique ID for this managed resource.

locations List[str]

List of regions for which Activity Log events are stored or streamed.

name str
retention_policies List[GetLogProfileRetentionPolicy]
servicebus_rule_id str

The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to.

storage_account_id str

The resource id of the storage account in which the Activity Log is stored.

Supporting Types

GetLogProfileRetentionPolicy

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Days int

The number of days for the retention policy.

Enabled bool

A boolean value indicating whether the retention policy is enabled.

Days int

The number of days for the retention policy.

Enabled bool

A boolean value indicating whether the retention policy is enabled.

days number

The number of days for the retention policy.

enabled boolean

A boolean value indicating whether the retention policy is enabled.

days float

The number of days for the retention policy.

enabled bool

A boolean value indicating whether the retention policy is enabled.

Package Details

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