< Back
New-AzureRmApiManagementLogger
Post
NAME New-AzureRmApiManagementLogger
SYNOPSIS
Creates an API Management Logger.
SYNTAX
New-AzureRmApiManagementLogger -ConnectionString <String> -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>]
[-Description <String>] [-IsBuffered <Boolean>] [-LoggerId <String>] -Name <String> [<CommonParameters>]
DESCRIPTION
The New-AzureRmApiManagementLogger cmdlet creates an Azure API Management Logger .
PARAMETERS
-ConnectionString <String>
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.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Context <PsApiManagementContext>
Specifies a PsApiManagementContext object.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Description <String>
Specifies a description.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-IsBuffered <Boolean>
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.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-LoggerId <String>
Specifies an ID for the logger. If you do not specify an ID, this cmdlet generates one.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the entity name of an event hub from Azure classic portal.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementLogger
NOTES
Example 1: Create a logger
PS C:\\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
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.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... mentlogger
Get-AzureRmApiManagementLogger
Remove-AzureRmApiManagementLogger
Set-AzureRmApiManagementLogger
SYNOPSIS
Creates an API Management Logger.
SYNTAX
New-AzureRmApiManagementLogger -ConnectionString <String> -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>]
[-Description <String>] [-IsBuffered <Boolean>] [-LoggerId <String>] -Name <String> [<CommonParameters>]
DESCRIPTION
The New-AzureRmApiManagementLogger cmdlet creates an Azure API Management Logger .
PARAMETERS
-ConnectionString <String>
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.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Context <PsApiManagementContext>
Specifies a PsApiManagementContext object.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Description <String>
Specifies a description.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-IsBuffered <Boolean>
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.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-LoggerId <String>
Specifies an ID for the logger. If you do not specify an ID, this cmdlet generates one.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the entity name of an event hub from Azure classic portal.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementLogger
NOTES
Example 1: Create a logger
PS C:\\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
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.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... mentlogger
Get-AzureRmApiManagementLogger
Remove-AzureRmApiManagementLogger
Set-AzureRmApiManagementLogger