canonical: https://jentic.com/apis/azure.com/streamanalyticsmanagementclient

# Microsoft Azure StreamAnalyticsManagementClient

Jentic publishes the only available OpenAPI specification for StreamAnalyticsManagementClient, keeping it validated and agent-ready. The Azure Stream Analytics management API exposes functions defined inside a streaming job - user-defined functions (UDFs), Azure Machine Learning bindings, and JavaScript scalar functions - together with operations to test them and retrieve default definitions. It covers create, update, list, delete, test, and retrieve-default-definition for functions on a streaming job. Use it to manage the function layer of a Stream Analytics job from CI/CD or operational scripts.

## For AI agents

Manage Stream Analytics user-defined functions on a streaming job: create, update, list, test, and retrieve default definitions.

## Scope

Does not manage streaming job lifecycle, inputs, outputs, or transformations - use for Stream Analytics function (UDF and ML binding) management only.

## Capabilities

- Create or update a user-defined function on a Stream Analytics streaming job
- List every function defined on a given streaming job
- Retrieve the default definition for an Azure ML function binding
- Test a function with a sample input to verify behaviour before deployment
- Patch an existing function definition without recreating it
- Delete a function from a streaming job

## Use cases

### CI/CD for Stream Analytics Functions

Stream Analytics queries often depend on JavaScript UDFs and Azure ML scoring bindings that need to evolve alongside the streaming job's logic. StreamAnalyticsManagementClient supports create-or-update, patch, and delete on functions per streaming job, so a deployment pipeline can apply function changes from a Git repository without going through the Azure portal. The test endpoint lets the pipeline validate behaviour before promoting the change.

Example prompt: Create a JavaScript UDF named 'parseSensorPayload' on streaming job 'iot-pipeline' in resource group 'iot-rg' with the supplied function body, then run the test endpoint with a sample payload.

### Wiring Azure ML Models into Streaming Jobs

Stream Analytics can call Azure ML web services as scalar functions. The retrieve-default-definition endpoint introspects the ML web service and returns the function definition shape (inputs, outputs, binding); the create-or-update endpoint then registers it on the streaming job. This is how a real-time scoring pipeline goes from a trained model to live inference inside a SQL-like streaming query.

Example prompt: Call the retrieve-default-definition endpoint for ML web service URL https://example.azureml.net/score, then create a function 'scoreFraud' on streaming job 'fraud-pipeline' using the returned definition.

### Pre-Deployment Function Testing

Before pushing a function change to a running streaming job, teams want to verify the function returns the expected output for a representative input. The /test endpoint accepts a function and a sample payload and returns the result, letting a pipeline gate promotion on a successful test. This eliminates a class of late-night incidents caused by broken UDF logic.

Example prompt: POST to the test endpoint for function 'parseSensorPayload' on streaming job 'iot-pipeline' with the sample payload {"raw":"42,77"}.

### Agent-Driven Streaming Pipeline Updates via Jentic

An AI agent supporting a data engineering team can propose and apply changes to Stream Analytics functions through Jentic. The agent searches by intent, loads the create-or-update operation schema, and submits the updated function body. Azure AD tokens stay inside your Jentic One instance, so the agent never holds credentials directly.

Example prompt: Use Jentic to load the StreamAnalyticsManagementClient create-or-update function operation, then update function 'parseSensorPayload' with a new JavaScript body.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions | List functions on a streaming job |
| PUT | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName} | Create or update a function |
| PATCH | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName} | Patch a function |
| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName} | Get a function by name |
| DELETE | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName} | Delete a function |
| POST | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition | Retrieve default definition for an Azure ML function binding |
| POST | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test | Test a function with a sample payload |

## Key resources

- **Functions** — User-defined functions on a streaming job - JavaScript UDFs and Azure ML bindings
- **Function Test** — Test a function with a sample payload before deployment
- **Default Definition Retrieval** — Retrieve the default function definition for an Azure ML web service binding

## Why Jentic

- **Setup:** Wiring StreamAnalyticsManagementClient by hand means standing up Azure AD OAuth 2.0 against management.azure.com, pinning the 2016-03-01 api-version on every call, and handling Azure Resource Manager retries and 429 back-off yourself before you can touch a single streaming-job function. Through Jentic you install once, import StreamAnalyticsManagementClient from the API Directory, store the Azure AD OAuth token once, and your agent calls it.
- **Permission scoping:** The streaming job and function names travel in the URL path (/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}), so a rule can pin your agent to functions on one job in one resource group. You choose the operations it may call, so destructive ones like delete a function or overwrite it with PUT are not included unless you add them.
- **Credential handling:** Your Azure AD OAuth token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'add a JavaScript UDF to a Stream Analytics job' or 'test a Stream Analytics function before deploying', and Jentic returns the matching operation with its input schema so the agent fills in the job, function, and body without reading the ARM reference.

## Related APIs

- **SqlManagementClient** — Inspect Azure SQL Database schemas often used as a Stream Analytics output sink
- **StorageImportExport** — Bulk transfer of historical data into Azure Storage that Stream Analytics can later reference
- **Cloud Dataflow** — Google Cloud's managed streaming analytics service

## FAQ

### Why is there no official OpenAPI spec for StreamAnalyticsManagementClient?

Microsoft Azure publishes Swagger fragments for the Microsoft.StreamAnalytics resource provider but does not publish a consolidated, validated OpenAPI 3 spec for the functions surface. Jentic generates and maintains this spec so that AI agents and developers can call StreamAnalyticsManagementClient via structured tooling. It is validated against the live Azure Resource Manager API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the StreamAnalyticsManagementClient use?

All endpoints require Azure Active Directory OAuth 2.0, declared as the azure_auth security scheme with the user_impersonation scope against https://login.microsoftonline.com. Through Jentic, Azure tokens are held in the vault and injected at call time so the agent never sees the raw bearer token.

### Can I test a function before deploying it?

Yes. POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test runs the function against a supplied sample payload and returns the result, so a pipeline can validate behaviour before promoting the change.

### What are the rate limits for the StreamAnalyticsManagementClient?

Calls go through Azure Resource Manager, which throttles writes per subscription (typically 1,200 writes per hour) and reads more generously. Function create-or-update is synchronous on the management plane; the streaming job picks up new function definitions on the next start.

### How do I bind an Azure ML model as a function through Jentic?

Run pip install jentic, search Jentic for 'add an azure ml function to stream analytics', call retrieve-default-definition with the ML web service URL, then load the create-or-update function operation and submit the returned definition. Jentic handles the Azure AD token exchange.

### Does this API manage Stream Analytics inputs and outputs?

No. This spec covers only functions on a streaming job (UDFs and ML bindings). Inputs, outputs, transformation queries, and the streaming job lifecycle live under separate Microsoft.StreamAnalytics endpoints not included here.

### Can I limit what my agent is allowed to do with the Azure Stream Analytics Management Client API?

Yes. Because you run Jentic One yourself, your own rules decide which operations and credentials the agent may use, so you choose whether it can only list and get functions on a streaming job or also create, patch, delete, and test them. Since the subscription, resource group, streaming job, and function names all travel in the URL path, a rule can pin the agent to functions on one job in one resource group. Destructive operations like deleting a function or overwriting it with PUT stay unavailable to the agent unless you explicitly grant them, and your Azure AD OAuth token is injected at call time so the agent never handles it directly.
