![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.apimanagement.kotlin.WorkspaceLogger.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.apimanagement.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [WorkspaceLogger].
*/
@PulumiTagMarker
public class WorkspaceLoggerResourceBuilder internal constructor() {
public var name: String? = null
public var args: WorkspaceLoggerArgs = WorkspaceLoggerArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend WorkspaceLoggerArgsBuilder.() -> Unit) {
val builder = WorkspaceLoggerArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): WorkspaceLogger {
val builtJavaResource =
com.pulumi.azurenative.apimanagement.WorkspaceLogger(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return WorkspaceLogger(builtJavaResource)
}
}
/**
* Logger details.
* Azure REST API version: 2023-09-01-preview.
* Other available API versions: 2024-05-01.
* ## Example Usage
* ### ApiManagementCreateWorkspaceAILogger
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var workspaceLogger = new AzureNative.ApiManagement.WorkspaceLogger("workspaceLogger", new()
* {
* Credentials =
* {
* { "instrumentationKey", "11................a1" },
* },
* Description = "adding a new logger",
* LoggerId = "loggerId",
* LoggerType = AzureNative.ApiManagement.LoggerType.ApplicationInsights,
* ResourceGroupName = "rg1",
* ServiceName = "apimService1",
* WorkspaceId = "wks1",
* });
* });
* ```
* ```go
* package main
* import (
* apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := apimanagement.NewWorkspaceLogger(ctx, "workspaceLogger", &apimanagement.WorkspaceLoggerArgs{
* Credentials: pulumi.StringMap{
* "instrumentationKey": pulumi.String("11................a1"),
* },
* Description: pulumi.String("adding a new logger"),
* LoggerId: pulumi.String("loggerId"),
* LoggerType: pulumi.String(apimanagement.LoggerTypeApplicationInsights),
* ResourceGroupName: pulumi.String("rg1"),
* ServiceName: pulumi.String("apimService1"),
* WorkspaceId: pulumi.String("wks1"),
* })
* 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.apimanagement.WorkspaceLogger;
* import com.pulumi.azurenative.apimanagement.WorkspaceLoggerArgs;
* 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 workspaceLogger = new WorkspaceLogger("workspaceLogger", WorkspaceLoggerArgs.builder()
* .credentials(Map.of("instrumentationKey", "11................a1"))
* .description("adding a new logger")
* .loggerId("loggerId")
* .loggerType("applicationInsights")
* .resourceGroupName("rg1")
* .serviceName("apimService1")
* .workspaceId("wks1")
* .build());
* }
* }
* ```
* ### ApiManagementCreateWorkspaceEHLogger
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var workspaceLogger = new AzureNative.ApiManagement.WorkspaceLogger("workspaceLogger", new()
* {
* Credentials =
* {
* { "connectionString", "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=" },
* { "name", "hydraeventhub" },
* },
* Description = "adding a new logger",
* LoggerId = "eh1",
* LoggerType = AzureNative.ApiManagement.LoggerType.AzureEventHub,
* ResourceGroupName = "rg1",
* ServiceName = "apimService1",
* WorkspaceId = "wks1",
* });
* });
* ```
* ```go
* package main
* import (
* apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := apimanagement.NewWorkspaceLogger(ctx, "workspaceLogger", &apimanagement.WorkspaceLoggerArgs{
* Credentials: pulumi.StringMap{
* "connectionString": pulumi.String("Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********="),
* "name": pulumi.String("hydraeventhub"),
* },
* Description: pulumi.String("adding a new logger"),
* LoggerId: pulumi.String("eh1"),
* LoggerType: pulumi.String(apimanagement.LoggerTypeAzureEventHub),
* ResourceGroupName: pulumi.String("rg1"),
* ServiceName: pulumi.String("apimService1"),
* WorkspaceId: pulumi.String("wks1"),
* })
* 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.apimanagement.WorkspaceLogger;
* import com.pulumi.azurenative.apimanagement.WorkspaceLoggerArgs;
* 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 workspaceLogger = new WorkspaceLogger("workspaceLogger", WorkspaceLoggerArgs.builder()
* .credentials(Map.ofEntries(
* Map.entry("connectionString", "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********="),
* Map.entry("name", "hydraeventhub")
* ))
* .description("adding a new logger")
* .loggerId("eh1")
* .loggerType("azureEventHub")
* .resourceGroupName("rg1")
* .serviceName("apimService1")
* .workspaceId("wks1")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:apimanagement:WorkspaceLogger eh1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}
* ```
*/
public class WorkspaceLogger internal constructor(
override val javaResource: com.pulumi.azurenative.apimanagement.WorkspaceLogger,
) : KotlinCustomResource(javaResource, WorkspaceLoggerMapper) {
/**
* The name and SendRule connection string of the event hub for azureEventHub logger.
* Instrumentation key for applicationInsights logger.
*/
public val credentials: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy