Skip to main content

functions

Creates, updates, deletes, gets or lists a functions resource.

Overview

Namefunctions
TypeResource
Idazure.stream_analytics.functions

Fields

The following fields are returned by SELECT queries:

Successfully retrieved the specified function.

NameDatatypeDescription
idstringResource Id
namestringResource name
propertiesobjectThe properties that are associated with a function.
typestringResource type

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, jobName, functionNameGets details about the specified function.
list_by_streaming_jobselectsubscriptionId, resourceGroupName, jobName$selectLists all of the functions under the specified streaming job.
create_or_replaceinsertsubscriptionId, resourceGroupName, jobName, functionNameIf-Match, If-None-MatchCreates a function or replaces an already existing function under an existing streaming job.
updateupdatesubscriptionId, resourceGroupName, jobName, functionNameIf-MatchUpdates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.
deletedeletesubscriptionId, resourceGroupName, jobName, functionNameDeletes a function from the streaming job.
testexecsubscriptionId, resourceGroupName, jobName, functionNameTests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct.
retrieve_default_definitionexecsubscriptionId, resourceGroupName, jobName, functionName, bindingTypeRetrieves the default definition of a function based on the parameters specified.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
functionNamestringThe name of the function.
jobNamestringThe name of the streaming job.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.
$selectstringThe $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or "" to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '' as a valid value.
If-MatchstringThe ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.
If-None-MatchstringSet to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response.

SELECT examples

Gets details about the specified function.

SELECT
id,
name,
properties,
type
FROM azure.stream_analytics.functions
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND jobName = '{{ jobName }}' -- required
AND functionName = '{{ functionName }}' -- required
;

INSERT examples

Creates a function or replaces an already existing function under an existing streaming job.

INSERT INTO azure.stream_analytics.functions (
data__name,
data__properties,
subscriptionId,
resourceGroupName,
jobName,
functionName,
If-Match,
If-None-Match
)
SELECT
'{{ name }}',
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ jobName }}',
'{{ functionName }}',
'{{ If-Match }}',
'{{ If-None-Match }}'
RETURNING
id,
name,
properties,
type
;

UPDATE examples

Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.

UPDATE azure.stream_analytics.functions
SET
data__name = '{{ name }}',
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND jobName = '{{ jobName }}' --required
AND functionName = '{{ functionName }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
properties,
type;

DELETE examples

Deletes a function from the streaming job.

DELETE FROM azure.stream_analytics.functions
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND jobName = '{{ jobName }}' --required
AND functionName = '{{ functionName }}' --required
;

Lifecycle Methods

Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct.

EXEC azure.stream_analytics.functions.test 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@jobName='{{ jobName }}' --required,
@functionName='{{ functionName }}' --required
@@json=
'{
"name": "{{ name }}",
"properties": "{{ properties }}"
}'
;