1. Packages
  2. Azure Classic
  3. API Docs
  4. monitoring
  5. getLogProfile

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.monitoring.getLogProfile

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

    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);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.monitoring.get_log_profile(name="test-logprofile")
    pulumi.export("logProfileStorageAccountId", example.storage_account_id)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    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>
    a retention_policy block as documented below.
    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
    a retention_policy block as documented below.
    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>
    a retention_policy block as documented below.
    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[]
    a retention_policy block as documented below.
    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]
    a retention_policy block as documented below.
    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>
    a retention_policy block as documented below.
    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
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi