Log Profile Args
data class LogProfileArgs(val categories: Output<List<String>>? = null, val location: Output<String>? = null, val locations: Output<List<String>>? = null, val logProfileName: Output<String>? = null, val retentionPolicy: Output<RetentionPolicyArgs>? = null, val serviceBusRuleId: Output<String>? = null, val storageAccountId: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<LogProfileArgs>
The log profile resource. API Version: 2016-03-01.
Example Usage
Create or update a log profile
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var logProfile = new AzureNative.Insights.LogProfile("logProfile", new()
{
Categories = new[]
{
"Write",
"Delete",
"Action",
},
Location = "",
Locations = new[]
{
"global",
},
LogProfileName = "Rac46PostSwapRG",
RetentionPolicy = new AzureNative.Insights.Inputs.RetentionPolicyArgs
{
Days = 3,
Enabled = true,
},
ServiceBusRuleId = "",
StorageAccountId = "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162",
Tags = null,
});
});
Content copied to clipboard
package main
import (
insights "github.com/pulumi/pulumi-azure-native-sdk/insights"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := insights.NewLogProfile(ctx, "logProfile", &insights.LogProfileArgs{
Categories: pulumi.StringArray{
pulumi.String("Write"),
pulumi.String("Delete"),
pulumi.String("Action"),
},
Location: pulumi.String(""),
Locations: pulumi.StringArray{
pulumi.String("global"),
},
LogProfileName: pulumi.String("Rac46PostSwapRG"),
RetentionPolicy: &insights.RetentionPolicyArgs{
Days: pulumi.Int(3),
Enabled: pulumi.Bool(true),
},
ServiceBusRuleId: pulumi.String(""),
StorageAccountId: pulumi.String("/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162"),
Tags: nil,
})
if err != nil {
return err
}
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.azurenative.insights.LogProfile;
import com.pulumi.azurenative.insights.LogProfileArgs;
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) {
var logProfile = new LogProfile("logProfile", LogProfileArgs.builder()
.categories(
"Write",
"Delete",
"Action")
.location("")
.locations("global")
.logProfileName("Rac46PostSwapRG")
.retentionPolicy(Map.ofEntries(
Map.entry("days", 3),
Map.entry("enabled", true)
))
.serviceBusRuleId("")
.storageAccountId("/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162")
.tags()
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:insights:LogProfile default /subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/microsoft.insights/logprofiles/default
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(categories: Output<List<String>>? = null, location: Output<String>? = null, locations: Output<List<String>>? = null, logProfileName: Output<String>? = null, retentionPolicy: Output<RetentionPolicyArgs>? = null, serviceBusRuleId: Output<String>? = null, storageAccountId: Output<String>? = null, tags: Output<Map<String, String>>? = null)
Properties
Link copied to clipboard
the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'
Link copied to clipboard
The name of the log profile.
Link copied to clipboard
the retention policy for the events in the log.
Link copied to clipboard
The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'.
Link copied to clipboard
the resource id of the storage account to which you would like to send the Activity Log.