New-​Azure​Rm​Api​Management​Logger

Creates an API Management Logger.

Syntax

New-AzureRmApiManagementLogger
   -ConnectionString <String>
   -Context <PsApiManagementContext>
   [-Description <String>]
   [-IsBuffered <Boolean>]
   [-LoggerId <String>]
   -Name <String>
   [<CommonParameters>]

Description

The New-AzureRmApiManagementLogger cmdlet creates an Azure API Management Logger.

Examples

Example 1: Create a logger

PS C:\>New-AzureRmApiManagementLogger -Context $ApimContext -LoggerId "Logger123" -Name "ContosoSdkEventHub" -ConnectionString "Endpoint=sb://ContosoSdkEventHubs.servicebus.windows.net/;SharedAccessKeyName=SendKey;SharedAccessKey=<key>" -Description "SDK event hub logger"

This command creates a logger named ContosoSdkEventHub by using the specified connection string.

Required Parameters

-ConnectionString

Specifies an Azure Event Hubs connection string that starts with the following:

Endpoint=endpoint and key from Azure classic portal

The Key with Send Rights in the connection string must be configured.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Context

Specifies a PsApiManagementContext object.

Type:PsApiManagementContext
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

Specifies the entity name of an event hub from Azure classic portal.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Description

Specifies a description.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-IsBuffered

Specifies whether the records in the logger are buffered before publishing. The default value is $True. When records are buffered, they are sent to Event Hubs every 15 seconds, or whenever the buffer receives 256 KB of messages.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-LoggerId

Specifies an ID for the logger. If you do not specify an ID, this cmdlet generates one.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementLogger