Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.14.0 published on Thursday, Jul 28, 2022 by Pulumi

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/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
	})
}
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()));
    }
}
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);
variables:
  example:
    Fn::Invoke:
      Function: azure:monitoring:getLogProfile
      Arguments:
        name: test-logprofile
outputs:
  logProfileStorageAccountId: ${example.storageAccountId}

Using getLogProfile

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 getLogProfile(args: GetLogProfileArgs, opts?: InvokeOptions): Promise<GetLogProfileResult>
function getLogProfileOutput(args: GetLogProfileOutputArgs, opts?: InvokeOptions): Output<GetLogProfileResult>
def get_log_profile(name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetLogProfileResult
def get_log_profile_output(name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetLogProfileResult]
func LookupLogProfile(ctx *Context, args *LookupLogProfileArgs, opts ...InvokeOption) (*LookupLogProfileResult, error)
func LookupLogProfileOutput(ctx *Context, args *LookupLogProfileOutputArgs, opts ...InvokeOption) LookupLogProfileResultOutput

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

public static class GetLogProfile 
{
    public static Task<GetLogProfileResult> InvokeAsync(GetLogProfileArgs args, InvokeOptions? opts = null)
    public static Output<GetLogProfileResult> Invoke(GetLogProfileInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetLogProfileResult> getLogProfile(GetLogProfileArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azure:monitoring/getLogProfile:getLogProfile
  Arguments:
    # Arguments dictionary

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 string

Specifies the Name of the Log Profile.

name str

Specifies the Name of the Log Profile.

name String

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 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 Sequence[str]

List of categories of the logs.

id str

The provider-assigned unique ID for this managed resource.

locations Sequence[str]

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

name str
retention_policies Sequence[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.

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<Property Map>
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.

Supporting Types

GetLogProfileRetentionPolicy

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 Integer

The number of days for the retention policy.

enabled Boolean

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 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.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.