functions
Creates, updates, deletes, gets or lists a functions resource.
Overview
| Name | functions |
| Type | Resource |
| Id | azure.stream_analytics.functions |
Fields
The following fields are returned by SELECT queries:
- retrieve_default_definition
- get
- list_by_streaming_job
| Name | Datatype | Description |
|---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
etag | string | The current entity tag for the function. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. |
properties | object | |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
etag | string | The current entity tag for the function. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. |
properties | object | |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
etag | string | The current entity tag for the function. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. |
properties | object | |
type | string | Resource type. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
retrieve_default_definition | select | resource_group_name, job_name, function_name, subscription_id | Retrieves the default definition of a function based on the parameters specified. | |
get | select | resource_group_name, job_name, function_name, subscription_id | Gets details about the specified function. | |
list_by_streaming_job | select | resource_group_name, job_name, subscription_id | $select | Lists all of the functions under the specified streaming job. |
create_or_replace | insert | resource_group_name, job_name, function_name, subscription_id | If-Match, If-None-Match | Creates a function or replaces an already existing function under an existing streaming job. |
update | update | resource_group_name, job_name, function_name, subscription_id | If-Match | 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. |
create_or_replace | replace | resource_group_name, job_name, function_name, subscription_id | If-Match, If-None-Match | Creates a function or replaces an already existing function under an existing streaming job. |
delete | delete | resource_group_name, job_name, function_name, subscription_id | Deletes a function from the streaming job. | |
test | exec | resource_group_name, job_name, function_name, subscription_id | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
function_name | string | The name of the function. Required. |
job_name | string | The name of the streaming job. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
$select | string | The $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. Default value is None. |
If-Match | string | The 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. Default value is None. |
If-None-Match | string | Set 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. Default value is None. |
SELECT examples
- retrieve_default_definition
- get
- list_by_streaming_job
Retrieves the default definition of a function based on the parameters specified.
SELECT
id,
name,
etag,
properties,
type
FROM azure.stream_analytics.functions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND job_name = '{{ job_name }}' -- required
AND function_name = '{{ function_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets details about the specified function.
SELECT
id,
name,
etag,
properties,
type
FROM azure.stream_analytics.functions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND job_name = '{{ job_name }}' -- required
AND function_name = '{{ function_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all of the functions under the specified streaming job.
SELECT
id,
name,
etag,
properties,
type
FROM azure.stream_analytics.functions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND job_name = '{{ job_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $select = '{{ $select }}'
;
INSERT examples
- create_or_replace
- Manifest
Creates a function or replaces an already existing function under an existing streaming job.
INSERT INTO azure.stream_analytics.functions (
name,
properties,
resource_group_name,
job_name,
function_name,
subscription_id,
If-Match,
If-None-Match
)
SELECT
'{{ name }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ job_name }}',
'{{ function_name }}',
'{{ subscription_id }}',
'{{ If-Match }}',
'{{ If-None-Match }}'
RETURNING
id,
name,
properties,
type
;
# Description fields are for documentation purposes
- name: functions
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the functions resource.
- name: job_name
value: "{{ job_name }}"
description: Required parameter for the functions resource.
- name: function_name
value: "{{ function_name }}"
description: Required parameter for the functions resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the functions resource.
- name: name
value: "{{ name }}"
description: |
Resource name.
- name: properties
description: |
The properties that are associated with a function.
value:
type: "{{ type }}"
etag: "{{ etag }}"
properties:
inputs:
- dataType: "{{ dataType }}"
isConfigurationParameter: {{ isConfigurationParameter }}
output:
dataType: "{{ dataType }}"
binding:
type: "{{ type }}"
- name: If-Match
value: "{{ If-Match }}"
description: The 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. Default value is None.
description: The 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. Default value is None.
- name: If-None-Match
value: "{{ If-None-Match }}"
description: Set 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. Default value is None.
description: Set 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. Default value is None.
UPDATE examples
- update
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
name = '{{ name }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND job_name = '{{ job_name }}' --required
AND function_name = '{{ function_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
properties,
type;
REPLACE examples
- create_or_replace
Creates a function or replaces an already existing function under an existing streaming job.
REPLACE azure.stream_analytics.functions
SET
name = '{{ name }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND job_name = '{{ job_name }}' --required
AND function_name = '{{ function_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
AND If-None-Match = '{{ If-None-Match}}'
RETURNING
id,
name,
properties,
type;
DELETE examples
- delete
Deletes a function from the streaming job.
DELETE FROM azure.stream_analytics.functions
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND job_name = '{{ job_name }}' --required
AND function_name = '{{ function_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- test
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
@resource_group_name='{{ resource_group_name }}' --required,
@job_name='{{ job_name }}' --required,
@function_name='{{ function_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"name": "{{ name }}",
"properties": "{{ properties }}"
}'
;