# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs

__all__ = [
    'GetLogProfileResult',
    'AwaitableGetLogProfileResult',
    'get_log_profile',
    'get_log_profile_output',
]

@pulumi.output_type
class GetLogProfileResult:
    """
    A collection of values returned by getLogProfile.
    """
    def __init__(__self__, categories=None, id=None, locations=None, name=None, retention_policies=None, servicebus_rule_id=None, storage_account_id=None):
        if categories and not isinstance(categories, list):
            raise TypeError("Expected argument 'categories' to be a list")
        pulumi.set(__self__, "categories", categories)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if locations and not isinstance(locations, list):
            raise TypeError("Expected argument 'locations' to be a list")
        pulumi.set(__self__, "locations", locations)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if retention_policies and not isinstance(retention_policies, list):
            raise TypeError("Expected argument 'retention_policies' to be a list")
        pulumi.set(__self__, "retention_policies", retention_policies)
        if servicebus_rule_id and not isinstance(servicebus_rule_id, str):
            raise TypeError("Expected argument 'servicebus_rule_id' to be a str")
        pulumi.set(__self__, "servicebus_rule_id", servicebus_rule_id)
        if storage_account_id and not isinstance(storage_account_id, str):
            raise TypeError("Expected argument 'storage_account_id' to be a str")
        pulumi.set(__self__, "storage_account_id", storage_account_id)

    @property
    @pulumi.getter
    def categories(self) -> Sequence[str]:
        """
        List of categories of the logs.
        """
        return pulumi.get(self, "categories")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def locations(self) -> Sequence[str]:
        """
        List of regions for which Activity Log events are stored or streamed.
        """
        return pulumi.get(self, "locations")

    @property
    @pulumi.getter
    def name(self) -> str:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="retentionPolicies")
    def retention_policies(self) -> Sequence['outputs.GetLogProfileRetentionPolicyResult']:
        """
        a `retention_policy` block as documented below.
        """
        return pulumi.get(self, "retention_policies")

    @property
    @pulumi.getter(name="servicebusRuleId")
    def servicebus_rule_id(self) -> 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.
        """
        return pulumi.get(self, "servicebus_rule_id")

    @property
    @pulumi.getter(name="storageAccountId")
    def storage_account_id(self) -> str:
        """
        The resource id of the storage account in which the Activity Log is stored.
        """
        return pulumi.get(self, "storage_account_id")


class AwaitableGetLogProfileResult(GetLogProfileResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetLogProfileResult(
            categories=self.categories,
            id=self.id,
            locations=self.locations,
            name=self.name,
            retention_policies=self.retention_policies,
            servicebus_rule_id=self.servicebus_rule_id,
            storage_account_id=self.storage_account_id)


def get_log_profile(name: Optional[str] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetLogProfileResult:
    """
    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](https://learn.microsoft.com/azure/azure-monitor/essentials/activity-log?tabs=powershell#legacy-collection-methods).

    ## Example Usage

    ```python
    import pulumi
    import pulumi_azure as azure

    example = azure.monitoring.get_log_profile(name="test-logprofile")
    pulumi.export("logProfileStorageAccountId", example.storage_account_id)
    ```


    :param str name: Specifies the Name of the Log Profile.
    """
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure:monitoring/getLogProfile:getLogProfile', __args__, opts=opts, typ=GetLogProfileResult).value

    return AwaitableGetLogProfileResult(
        categories=pulumi.get(__ret__, 'categories'),
        id=pulumi.get(__ret__, 'id'),
        locations=pulumi.get(__ret__, 'locations'),
        name=pulumi.get(__ret__, 'name'),
        retention_policies=pulumi.get(__ret__, 'retention_policies'),
        servicebus_rule_id=pulumi.get(__ret__, 'servicebus_rule_id'),
        storage_account_id=pulumi.get(__ret__, 'storage_account_id'))


@_utilities.lift_output_func(get_log_profile)
def get_log_profile_output(name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetLogProfileResult]:
    """
    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](https://learn.microsoft.com/azure/azure-monitor/essentials/activity-log?tabs=powershell#legacy-collection-methods).

    ## Example Usage

    ```python
    import pulumi
    import pulumi_azure as azure

    example = azure.monitoring.get_log_profile(name="test-logprofile")
    pulumi.export("logProfileStorageAccountId", example.storage_account_id)
    ```


    :param str name: Specifies the Name of the Log Profile.
    """
    ...
