azure-native.apimanagement.WorkspaceLogger
Explore with Pulumi AI
Logger details. Azure REST API version: 2023-09-01-preview.
Other available API versions: 2024-05-01.
Example Usage
ApiManagementCreateWorkspaceAILogger
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",
});
});
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
})
}
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());
}
}
import pulumi
import pulumi_azure_native as azure_native
workspace_logger = azure_native.apimanagement.WorkspaceLogger("workspaceLogger",
credentials={
"instrumentationKey": "11................a1",
},
description="adding a new logger",
logger_id="loggerId",
logger_type=azure_native.apimanagement.LoggerType.APPLICATION_INSIGHTS,
resource_group_name="rg1",
service_name="apimService1",
workspace_id="wks1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const workspaceLogger = new azure_native.apimanagement.WorkspaceLogger("workspaceLogger", {
credentials: {
instrumentationKey: "11................a1",
},
description: "adding a new logger",
loggerId: "loggerId",
loggerType: azure_native.apimanagement.LoggerType.ApplicationInsights,
resourceGroupName: "rg1",
serviceName: "apimService1",
workspaceId: "wks1",
});
resources:
workspaceLogger:
type: azure-native:apimanagement:WorkspaceLogger
properties:
credentials:
instrumentationKey: 11................a1
description: adding a new logger
loggerId: loggerId
loggerType: applicationInsights
resourceGroupName: rg1
serviceName: apimService1
workspaceId: wks1
ApiManagementCreateWorkspaceEHLogger
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",
});
});
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
})
}
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 pulumi
import pulumi_azure_native as azure_native
workspace_logger = azure_native.apimanagement.WorkspaceLogger("workspaceLogger",
credentials={
"connectionString": "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=",
"name": "hydraeventhub",
},
description="adding a new logger",
logger_id="eh1",
logger_type=azure_native.apimanagement.LoggerType.AZURE_EVENT_HUB,
resource_group_name="rg1",
service_name="apimService1",
workspace_id="wks1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const workspaceLogger = new azure_native.apimanagement.WorkspaceLogger("workspaceLogger", {
credentials: {
connectionString: "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=",
name: "hydraeventhub",
},
description: "adding a new logger",
loggerId: "eh1",
loggerType: azure_native.apimanagement.LoggerType.AzureEventHub,
resourceGroupName: "rg1",
serviceName: "apimService1",
workspaceId: "wks1",
});
resources:
workspaceLogger:
type: azure-native:apimanagement:WorkspaceLogger
properties:
credentials:
connectionString: Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=
name: hydraeventhub
description: adding a new logger
loggerId: eh1
loggerType: azureEventHub
resourceGroupName: rg1
serviceName: apimService1
workspaceId: wks1
Create WorkspaceLogger Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkspaceLogger(name: string, args: WorkspaceLoggerArgs, opts?: CustomResourceOptions);
@overload
def WorkspaceLogger(resource_name: str,
args: WorkspaceLoggerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkspaceLogger(resource_name: str,
opts: Optional[ResourceOptions] = None,
logger_type: Optional[Union[str, LoggerType]] = None,
resource_group_name: Optional[str] = None,
service_name: Optional[str] = None,
workspace_id: Optional[str] = None,
credentials: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
is_buffered: Optional[bool] = None,
logger_id: Optional[str] = None,
resource_id: Optional[str] = None)
func NewWorkspaceLogger(ctx *Context, name string, args WorkspaceLoggerArgs, opts ...ResourceOption) (*WorkspaceLogger, error)
public WorkspaceLogger(string name, WorkspaceLoggerArgs args, CustomResourceOptions? opts = null)
public WorkspaceLogger(String name, WorkspaceLoggerArgs args)
public WorkspaceLogger(String name, WorkspaceLoggerArgs args, CustomResourceOptions options)
type: azure-native:apimanagement:WorkspaceLogger
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args WorkspaceLoggerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WorkspaceLoggerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WorkspaceLoggerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkspaceLoggerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkspaceLoggerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var workspaceLoggerResource = new AzureNative.ApiManagement.WorkspaceLogger("workspaceLoggerResource", new()
{
LoggerType = "string",
ResourceGroupName = "string",
ServiceName = "string",
WorkspaceId = "string",
Credentials =
{
{ "string", "string" },
},
Description = "string",
IsBuffered = false,
LoggerId = "string",
ResourceId = "string",
});
example, err := apimanagement.NewWorkspaceLogger(ctx, "workspaceLoggerResource", &apimanagement.WorkspaceLoggerArgs{
LoggerType: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
ServiceName: pulumi.String("string"),
WorkspaceId: pulumi.String("string"),
Credentials: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
IsBuffered: pulumi.Bool(false),
LoggerId: pulumi.String("string"),
ResourceId: pulumi.String("string"),
})
var workspaceLoggerResource = new WorkspaceLogger("workspaceLoggerResource", WorkspaceLoggerArgs.builder()
.loggerType("string")
.resourceGroupName("string")
.serviceName("string")
.workspaceId("string")
.credentials(Map.of("string", "string"))
.description("string")
.isBuffered(false)
.loggerId("string")
.resourceId("string")
.build());
workspace_logger_resource = azure_native.apimanagement.WorkspaceLogger("workspaceLoggerResource",
logger_type="string",
resource_group_name="string",
service_name="string",
workspace_id="string",
credentials={
"string": "string",
},
description="string",
is_buffered=False,
logger_id="string",
resource_id="string")
const workspaceLoggerResource = new azure_native.apimanagement.WorkspaceLogger("workspaceLoggerResource", {
loggerType: "string",
resourceGroupName: "string",
serviceName: "string",
workspaceId: "string",
credentials: {
string: "string",
},
description: "string",
isBuffered: false,
loggerId: "string",
resourceId: "string",
});
type: azure-native:apimanagement:WorkspaceLogger
properties:
credentials:
string: string
description: string
isBuffered: false
loggerId: string
loggerType: string
resourceGroupName: string
resourceId: string
serviceName: string
workspaceId: string
WorkspaceLogger Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The WorkspaceLogger resource accepts the following input properties:
- Logger
Type string | Pulumi.Azure Native. Api Management. Logger Type - Logger type.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Service
Name string - The name of the API Management service.
- Workspace
Id string - Workspace identifier. Must be unique in the current API Management service instance.
- Credentials Dictionary<string, string>
- The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights logger.
- Description string
- Logger description.
- Is
Buffered bool - Whether records are buffered in the logger before publishing. Default is assumed to be true.
- Logger
Id string - Logger identifier. Must be unique in the API Management service instance.
- Resource
Id string - Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
- Logger
Type string | LoggerType - Logger type.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Service
Name string - The name of the API Management service.
- Workspace
Id string - Workspace identifier. Must be unique in the current API Management service instance.
- Credentials map[string]string
- The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights logger.
- Description string
- Logger description.
- Is
Buffered bool - Whether records are buffered in the logger before publishing. Default is assumed to be true.
- Logger
Id string - Logger identifier. Must be unique in the API Management service instance.
- Resource
Id string - Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
- logger
Type String | LoggerType - Logger type.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- service
Name String - The name of the API Management service.
- workspace
Id String - Workspace identifier. Must be unique in the current API Management service instance.
- credentials Map<String,String>
- The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights logger.
- description String
- Logger description.
- is
Buffered Boolean - Whether records are buffered in the logger before publishing. Default is assumed to be true.
- logger
Id String - Logger identifier. Must be unique in the API Management service instance.
- resource
Id String - Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
- logger
Type string | LoggerType - Logger type.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- service
Name string - The name of the API Management service.
- workspace
Id string - Workspace identifier. Must be unique in the current API Management service instance.
- credentials {[key: string]: string}
- The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights logger.
- description string
- Logger description.
- is
Buffered boolean - Whether records are buffered in the logger before publishing. Default is assumed to be true.
- logger
Id string - Logger identifier. Must be unique in the API Management service instance.
- resource
Id string - Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
- logger_
type str | LoggerType - Logger type.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- service_
name str - The name of the API Management service.
- workspace_
id str - Workspace identifier. Must be unique in the current API Management service instance.
- credentials Mapping[str, str]
- The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights logger.
- description str
- Logger description.
- is_
buffered bool - Whether records are buffered in the logger before publishing. Default is assumed to be true.
- logger_
id str - Logger identifier. Must be unique in the API Management service instance.
- resource_
id str - Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
- logger
Type String | "azureEvent Hub" | "application Insights" | "azure Monitor" - Logger type.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- service
Name String - The name of the API Management service.
- workspace
Id String - Workspace identifier. Must be unique in the current API Management service instance.
- credentials Map<String>
- The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights logger.
- description String
- Logger description.
- is
Buffered Boolean - Whether records are buffered in the logger before publishing. Default is assumed to be true.
- logger
Id String - Logger identifier. Must be unique in the API Management service instance.
- resource
Id String - Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkspaceLogger resource produces the following output properties:
Supporting Types
LoggerType, LoggerTypeArgs
- Azure
Event Hub - azureEventHubAzure Event Hub as log destination.
- Application
Insights - applicationInsightsAzure Application Insights as log destination.
- Azure
Monitor - azureMonitorAzure Monitor
- Logger
Type Azure Event Hub - azureEventHubAzure Event Hub as log destination.
- Logger
Type Application Insights - applicationInsightsAzure Application Insights as log destination.
- Logger
Type Azure Monitor - azureMonitorAzure Monitor
- Azure
Event Hub - azureEventHubAzure Event Hub as log destination.
- Application
Insights - applicationInsightsAzure Application Insights as log destination.
- Azure
Monitor - azureMonitorAzure Monitor
- Azure
Event Hub - azureEventHubAzure Event Hub as log destination.
- Application
Insights - applicationInsightsAzure Application Insights as log destination.
- Azure
Monitor - azureMonitorAzure Monitor
- AZURE_EVENT_HUB
- azureEventHubAzure Event Hub as log destination.
- APPLICATION_INSIGHTS
- applicationInsightsAzure Application Insights as log destination.
- AZURE_MONITOR
- azureMonitorAzure Monitor
- "azure
Event Hub" - azureEventHubAzure Event Hub as log destination.
- "application
Insights" - applicationInsightsAzure Application Insights as log destination.
- "azure
Monitor" - azureMonitorAzure Monitor
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:apimanagement:WorkspaceLogger eh1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0