get Log Profile
Use this data source to access the properties of a Log Profile. !>NOTE: Azure Log Profiles will be retired on 30th September 2026 and will be removed in v4.0 of the AzureRM Provider. More information on the deprecation can be found in the Azure documentation.
Example Usage
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);
Content copied to clipboard
import pulumi
import pulumi_azure as azure
example = azure.monitoring.get_log_profile(name="test-logprofile")
pulumi.export("logProfileStorageAccountId", example.storage_account_id)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Monitoring.GetLogProfile.Invoke(new()
{
Name = "test-logprofile",
});
return new Dictionary<string, object?>
{
["logProfileStorageAccountId"] = example.Apply(getLogProfileResult => getLogProfileResult.StorageAccountId),
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
"github.com/pulumi/pulumi/sdk/v3/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
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.monitoring.MonitoringFunctions;
import com.pulumi.azure.monitoring.inputs.GetLogProfileArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = MonitoringFunctions.getLogProfile(GetLogProfileArgs.builder()
.name("test-logprofile")
.build());
ctx.export("logProfileStorageAccountId", example.applyValue(getLogProfileResult -> getLogProfileResult.storageAccountId()));
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
Function: azure:monitoring:getLogProfile
Arguments:
name: test-logprofile
outputs:
logProfileStorageAccountId: ${example.storageAccountId}
Content copied to clipboard
Return
A collection of values returned by getLogProfile.
Parameters
argument
A collection of arguments for invoking getLogProfile.
Return
A collection of values returned by getLogProfile.
Parameters
name
Specifies the Name of the Log Profile.
See also
suspend fun getLogProfile(argument: suspend GetLogProfilePlainArgsBuilder.() -> Unit): GetLogProfileResult
Return
A collection of values returned by getLogProfile.
Parameters
argument
Builder for com.pulumi.azure.monitoring.kotlin.inputs.GetLogProfilePlainArgs.