Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.insights.kotlin
import com.pulumi.azurenative.insights.LogProfileArgs.builder
import com.pulumi.azurenative.insights.kotlin.inputs.RetentionPolicyArgs
import com.pulumi.azurenative.insights.kotlin.inputs.RetentionPolicyArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* The log profile resource.
* Azure REST API version: 2016-03-01. Prior API version in Azure Native 1.x: 2016-03-01.
* ## Example Usage
* ### Create or update a log profile
* ```csharp
* 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,
* });
* });
* ```
* ```go
* package main
* import (
* insights "github.com/pulumi/pulumi-azure-native-sdk/insights/v2"
* "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
* })
* }
* ```
* ```java
* 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 com.pulumi.azurenative.insights.inputs.RetentionPolicyArgs;
* 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(RetentionPolicyArgs.builder()
* .days(3)
* .enabled(true)
* .build())
* .serviceBusRuleId("")
* .storageAccountId("/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162")
* .tags()
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:insights:LogProfile default /subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}
* ```
* @property categories the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'
* @property location Resource location
* @property locations List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location.
* @property logProfileName The name of the log profile.
* @property retentionPolicy the retention policy for the events in the log.
* @property serviceBusRuleId 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}'.
* @property storageAccountId the resource id of the storage account to which you would like to send the Activity Log.
* @property tags Resource tags
*/
public data class LogProfileArgs(
public val categories: Output>? = null,
public val location: Output? = null,
public val locations: Output>? = null,
public val logProfileName: Output? = null,
public val retentionPolicy: Output? = null,
public val serviceBusRuleId: Output? = null,
public val storageAccountId: Output? = null,
public val tags: Output