< Back
New-AzureRmStreamAnalyticsFunction
Post
NAME New-AzureRmStreamAnalyticsFunction
SYNOPSIS
Creates or replaces a function in a Stream Analytics job.
SYNTAX
New-AzureRmStreamAnalyticsFunction [-ResourceGroupName] <String> [-JobName] <String> [[-Name] <String>] [-File]
<String> [-DefaultProfile <IAzureContextContainer>] [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmStreamAnalyticsFunction cmdlet creates a function in an Azure Stream Analytics job or replaces an
existing function. Define the function in a JavaScript Object Notation (JSON) file.
You can specify the name of the function by using the Name parameter or in the .json file. If you specify the name
in both ways, the names must match.
To replace an existing function, specify the name of the existing function.
PARAMETERS
-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
-File <String>
Specifies the path of a .json file that contains the JSON representation of the Stream Analytics function.
Required? true
Position? 3
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Force [<SwitchParameter>]
Indicates that this cmdlet replaces an existing Stream Analytics function without prompting you for
confirmation.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-JobName <String>
Specifies the name of the Stream Analytics job under which this cmdlet creates a Stream Analytics function.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the name of the Stream Analytics function that this cmdlet creates.
Required? false
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group under which this cmdlet creates a Stream Analytics function.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
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 (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.StreamAnalytics.Models.PSFunction
NOTES
Example 1: Create a Stream Analytics function
PS C:\\>New-AzureRmStreamAnalyticsFunction -ResourceGroupName "StreamAnalytics-Default-West-US" -JobName
"StreamJob07" -File "C:\\Function07.json"
This command creates a function from the file Function07.json. The name of the function is stored in the .json
file.
Example 2: Create a Stream Analytics function named ScoreTweet
PS C:\\>New-AzureRmStreamAnalyticsFunction -ResourceGroupName "StreamAnalytics-Default-West-US" -JobName
"StreamJob22" -File "C:\\Function22.json" -Name "ScoreTweet"
This command creates a function on the job named ScoreTweet.
Example 3: Replace a Stream Analytics function
PS C:\\>New-AzureRmStreamAnalyticsFunction -ResourceGroupName "StreamAnalytics-Default-West-US" -JobName
"StreamJob22" -File "C:\\Function22.json" -Name "ScoreTweet" -Force
This command replaces the definition of the existing function named ScoreTweet with the definition in
Function22.json.
RELATED LINKS
Online Version:
https://docs.microsoft.com/en-us/powers ... csfunction
Get-AzureRmStreamAnalyticsFunction
Remove-AzureRmStreamAnalyticsFunction
Test-AzureRmStreamAnalyticsFunction
SYNOPSIS
Creates or replaces a function in a Stream Analytics job.
SYNTAX
New-AzureRmStreamAnalyticsFunction [-ResourceGroupName] <String> [-JobName] <String> [[-Name] <String>] [-File]
<String> [-DefaultProfile <IAzureContextContainer>] [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmStreamAnalyticsFunction cmdlet creates a function in an Azure Stream Analytics job or replaces an
existing function. Define the function in a JavaScript Object Notation (JSON) file.
You can specify the name of the function by using the Name parameter or in the .json file. If you specify the name
in both ways, the names must match.
To replace an existing function, specify the name of the existing function.
PARAMETERS
-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
-File <String>
Specifies the path of a .json file that contains the JSON representation of the Stream Analytics function.
Required? true
Position? 3
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Force [<SwitchParameter>]
Indicates that this cmdlet replaces an existing Stream Analytics function without prompting you for
confirmation.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-JobName <String>
Specifies the name of the Stream Analytics job under which this cmdlet creates a Stream Analytics function.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the name of the Stream Analytics function that this cmdlet creates.
Required? false
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group under which this cmdlet creates a Stream Analytics function.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
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 (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.StreamAnalytics.Models.PSFunction
NOTES
Example 1: Create a Stream Analytics function
PS C:\\>New-AzureRmStreamAnalyticsFunction -ResourceGroupName "StreamAnalytics-Default-West-US" -JobName
"StreamJob07" -File "C:\\Function07.json"
This command creates a function from the file Function07.json. The name of the function is stored in the .json
file.
Example 2: Create a Stream Analytics function named ScoreTweet
PS C:\\>New-AzureRmStreamAnalyticsFunction -ResourceGroupName "StreamAnalytics-Default-West-US" -JobName
"StreamJob22" -File "C:\\Function22.json" -Name "ScoreTweet"
This command creates a function on the job named ScoreTweet.
Example 3: Replace a Stream Analytics function
PS C:\\>New-AzureRmStreamAnalyticsFunction -ResourceGroupName "StreamAnalytics-Default-West-US" -JobName
"StreamJob22" -File "C:\\Function22.json" -Name "ScoreTweet" -Force
This command replaces the definition of the existing function named ScoreTweet with the definition in
Function22.json.
RELATED LINKS
Online Version:
https://docs.microsoft.com/en-us/powers ... csfunction
Get-AzureRmStreamAnalyticsFunction
Remove-AzureRmStreamAnalyticsFunction
Test-AzureRmStreamAnalyticsFunction