Azure Native
Logger
Logger details. API Version: 2020-12-01.
Example Usage
ApiManagementCreateAILogger
using Pulumi;
using AzureNative = Pulumi.AzureNative;
class MyStack : Stack
{
public MyStack()
{
var logger = new AzureNative.ApiManagement.Logger("logger", new AzureNative.ApiManagement.LoggerArgs
{
Credentials =
{
{ "instrumentationKey", "11................a1" },
},
Description = "adding a new logger",
LoggerId = "loggerId",
LoggerType = "applicationInsights",
ResourceGroupName = "rg1",
ServiceName = "apimService1",
});
}
}
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native/sdk/go/azure/apimanagement"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewLogger(ctx, "logger", &apimanagement.LoggerArgs{
Credentials: pulumi.StringMap{
"instrumentationKey": pulumi.String("11................a1"),
},
Description: pulumi.String("adding a new logger"),
LoggerId: pulumi.String("loggerId"),
LoggerType: pulumi.String("applicationInsights"),
ResourceGroupName: pulumi.String("rg1"),
ServiceName: pulumi.String("apimService1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var logger = new Logger("logger", LoggerArgs.builder()
.credentials(Map.of("instrumentationKey", "11................a1"))
.description("adding a new logger")
.loggerId("loggerId")
.loggerType("applicationInsights")
.resourceGroupName("rg1")
.serviceName("apimService1")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
logger = azure_native.apimanagement.Logger("logger",
credentials={
"instrumentationKey": "11................a1",
},
description="adding a new logger",
logger_id="loggerId",
logger_type="applicationInsights",
resource_group_name="rg1",
service_name="apimService1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const logger = new azure_native.apimanagement.Logger("logger", {
credentials: {
instrumentationKey: "11................a1",
},
description: "adding a new logger",
loggerId: "loggerId",
loggerType: "applicationInsights",
resourceGroupName: "rg1",
serviceName: "apimService1",
});
resources:
logger:
type: azure-native:apimanagement:Logger
properties:
credentials:
instrumentationKey: 11................a1
description: adding a new logger
loggerId: loggerId
loggerType: applicationInsights
resourceGroupName: rg1
serviceName: apimService1
ApiManagementCreateEHLogger
using Pulumi;
using AzureNative = Pulumi.AzureNative;
class MyStack : Stack
{
public MyStack()
{
var logger = new AzureNative.ApiManagement.Logger("logger", new AzureNative.ApiManagement.LoggerArgs
{
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",
});
}
}
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native/sdk/go/azure/apimanagement"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewLogger(ctx, "logger", &apimanagement.LoggerArgs{
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("azureEventHub"),
ResourceGroupName: pulumi.String("rg1"),
ServiceName: pulumi.String("apimService1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var logger = new Logger("logger", LoggerArgs.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")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
logger = azure_native.apimanagement.Logger("logger",
credentials={
"connectionString": "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=",
"name": "hydraeventhub",
},
description="adding a new logger",
logger_id="eh1",
logger_type="azureEventHub",
resource_group_name="rg1",
service_name="apimService1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const logger = new azure_native.apimanagement.Logger("logger", {
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",
});
resources:
logger:
type: azure-native:apimanagement:Logger
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
Create a Logger Resource
new Logger(name: string, args: LoggerArgs, opts?: CustomResourceOptions);
@overload
def Logger(resource_name: str,
opts: Optional[ResourceOptions] = None,
credentials: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
is_buffered: Optional[bool] = None,
logger_id: Optional[str] = None,
logger_type: Optional[Union[str, LoggerType]] = None,
resource_group_name: Optional[str] = None,
resource_id: Optional[str] = None,
service_name: Optional[str] = None)
@overload
def Logger(resource_name: str,
args: LoggerArgs,
opts: Optional[ResourceOptions] = None)
func NewLogger(ctx *Context, name string, args LoggerArgs, opts ...ResourceOption) (*Logger, error)
public Logger(string name, LoggerArgs args, CustomResourceOptions? opts = null)
public Logger(String name, LoggerArgs args)
public Logger(String name, LoggerArgs args, CustomResourceOptions options)
type: azure-native:apimanagement:Logger
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LoggerArgs
- 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 LoggerArgs
- 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 LoggerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LoggerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LoggerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Logger 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 Logger 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.
- Service
Name string The name of the API Management service.
- 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.
- Service
Name string The name of the API Management service.
- 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.
- service
Name String The name of the API Management service.
- credentials
Map
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.
- service
Name string The name of the API Management service.
- 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.
- service_
name str The name of the API Management service.
- 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.
- service
Name String The name of the API Management service.
- credentials
Map
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 Logger resource produces the following output properties:
Supporting Types
LoggerType
- Azure
Event Hub - azureEventHub
Azure Event Hub as log destination.
- Application
Insights - applicationInsights
Azure Application Insights as log destination.
- Azure
Monitor - azureMonitor
Azure Monitor
- Logger
Type Azure Event Hub - azureEventHub
Azure Event Hub as log destination.
- Logger
Type Application Insights - applicationInsights
Azure Application Insights as log destination.
- Logger
Type Azure Monitor - azureMonitor
Azure Monitor
- Azure
Event Hub - azureEventHub
Azure Event Hub as log destination.
- Application
Insights - applicationInsights
Azure Application Insights as log destination.
- Azure
Monitor - azureMonitor
Azure Monitor
- Azure
Event Hub - azureEventHub
Azure Event Hub as log destination.
- Application
Insights - applicationInsights
Azure Application Insights as log destination.
- Azure
Monitor - azureMonitor
Azure Monitor
- AZURE_EVENT_HUB
- azureEventHub
Azure Event Hub as log destination.
- APPLICATION_INSIGHTS
- applicationInsights
Azure Application Insights as log destination.
- AZURE_MONITOR
- azureMonitor
Azure Monitor
- "azure
Event Hub" - azureEventHub
Azure Event Hub as log destination.
- "application
Insights" - applicationInsights
Azure Application Insights as log destination.
- "azure
Monitor" - azureMonitor
Azure Monitor
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:apimanagement:Logger eh1 /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/eh1
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure-native
- License
- Apache-2.0