azure.monitoring.getLogProfile
Use this data source to access the properties of a Log Profile.
Example Usage
using System.Collections.Generic;
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 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
- Retention
Policies List<GetLog Profile Retention Policy> a
retention_policy
block as documented below.- Servicebus
Rule stringId 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 stringId 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
- Retention
Policies []GetLog Profile Retention Policy a
retention_policy
block as documented below.- Servicebus
Rule stringId 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 stringId 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
- retention
Policies List<GetLog Profile Retention Policy> a
retention_policy
block as documented below.- servicebus
Rule StringId 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 StringId 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
- retention
Policies GetLog Profile Retention Policy[] a
retention_policy
block as documented below.- servicebus
Rule stringId 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 stringId 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[GetLog Profile Retention Policy] a
retention_policy
block as documented below.- servicebus_
rule_ strid 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_ strid 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
- retention
Policies List<Property Map> a
retention_policy
block as documented below.- servicebus
Rule StringId 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 StringId The resource id of the storage account in which the Activity Log is stored.
Supporting Types
GetLogProfileRetentionPolicy
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.