Create a DataflowResource
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}?api-version=2026-03-01
URI Parameters
| Name |
In |
Required |
Type |
Description |
|
dataflowName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Name of Instance dataflowProfile dataflow resource
|
|
dataflowProfileName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Name of Instance dataflowProfile resource
|
|
instanceName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Name of instance.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
The name of the resource group. The name is case insensitive.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
The ID of the target subscription. The value must be an UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
The API version to use for this operation.
|
Request Body
Responses
| Name |
Type |
Description |
|
200 OK
|
DataflowResource
|
Resource 'DataflowResource' update operation succeeded
|
|
201 Created
|
DataflowResource
|
Resource 'DataflowResource' create operation succeeded
Headers
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
An unexpected error response.
|
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name |
Description |
|
user_impersonation
|
impersonate your user account
|
Examples
Dataflow_CreateOrUpdate
Sample request
PUT https://management.azure.com/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123?api-version=2026-03-01
{
"properties": {
"mode": "Enabled",
"requestDiskPersistence": "Disabled",
"operations": [
{
"operationType": "Source",
"name": "knnafvkwoeakm",
"sourceSettings": {
"endpointRef": "iixotodhvhkkfcfyrkoveslqig",
"assetRef": "zayyykwmckaocywdkohmu",
"serializationFormat": "Json",
"schemaRef": "pknmdzqll",
"dataSources": [
"chkkpymxhp"
]
},
"builtInTransformationSettings": {
"serializationFormat": "Delta",
"schemaRef": "mcdc",
"datasets": [
{
"key": "qsfqcgxaxnhfumrsdsokwyv",
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
"schemaRef": "n",
"inputs": [
"mosffpsslifkq"
],
"expression": "aatbwomvflemsxialv"
}
],
"filter": [
{
"type": "Filter",
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
"inputs": [
"sxmjkbntgb"
],
"expression": "n"
}
],
"map": [
{
"type": "NewProperties",
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
"inputs": [
"xsbxuk"
],
"expression": "txoiltogsarwkzalsphvlmt",
"output": "nvgtmkfl"
}
]
},
"destinationSettings": {
"endpointRef": "kybkchnzimerguekuvqlqiqdvvrt",
"dataDestination": "cbrh"
}
}
]
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
}
}
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationDataset;
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationFilter;
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationMap;
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationSettings;
import com.azure.resourcemanager.iotoperations.models.DataflowDestinationOperationSettings;
import com.azure.resourcemanager.iotoperations.models.DataflowMappingType;
import com.azure.resourcemanager.iotoperations.models.DataflowOperation;
import com.azure.resourcemanager.iotoperations.models.DataflowProperties;
import com.azure.resourcemanager.iotoperations.models.DataflowSourceOperationSettings;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocation;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType;
import com.azure.resourcemanager.iotoperations.models.FilterType;
import com.azure.resourcemanager.iotoperations.models.OperationType;
import com.azure.resourcemanager.iotoperations.models.OperationalMode;
import com.azure.resourcemanager.iotoperations.models.SourceSerializationFormat;
import com.azure.resourcemanager.iotoperations.models.TransformationSerializationFormat;
import java.util.Arrays;
/**
* Samples for Dataflow CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json
*/
/**
* Sample code: Dataflow_CreateOrUpdate.
*
* @param manager Entry point to IoTOperationsManager.
*/
public static void dataflowCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) {
manager.dataflows().define("resource-name123")
.withExistingDataflowProfile("rgiotoperations", "resource-name123", "resource-name123")
.withProperties(new DataflowProperties().withMode(OperationalMode.ENABLED)
.withRequestDiskPersistence(OperationalMode.DISABLED)
.withOperations(Arrays.asList(new DataflowOperation().withOperationType(OperationType.SOURCE)
.withName("knnafvkwoeakm")
.withSourceSettings(new DataflowSourceOperationSettings()
.withEndpointRef("iixotodhvhkkfcfyrkoveslqig").withAssetRef("zayyykwmckaocywdkohmu")
.withSerializationFormat(SourceSerializationFormat.JSON).withSchemaRef("pknmdzqll")
.withDataSources(Arrays.asList("chkkpymxhp")))
.withBuiltInTransformationSettings(new DataflowBuiltInTransformationSettings()
.withSerializationFormat(TransformationSerializationFormat.DELTA).withSchemaRef("mcdc")
.withDatasets(Arrays.asList(new DataflowBuiltInTransformationDataset()
.withKey("fakeTokenPlaceholder")
.withDescription("Lorem ipsum odor amet, consectetuer adipiscing elit.").withSchemaRef("n")
.withInputs(Arrays.asList("mosffpsslifkq")).withExpression("aatbwomvflemsxialv")))
.withFilter(Arrays.asList(new DataflowBuiltInTransformationFilter().withType(FilterType.FILTER)
.withDescription("Lorem ipsum odor amet, consectetuer adipiscing elit.")
.withInputs(Arrays.asList("sxmjkbntgb")).withExpression("n")))
.withMap(Arrays
.asList(new DataflowBuiltInTransformationMap().withType(DataflowMappingType.NEW_PROPERTIES)
.withDescription("Lorem ipsum odor amet, consectetuer adipiscing elit.")
.withInputs(Arrays.asList("xsbxuk")).withExpression("txoiltogsarwkzalsphvlmt")
.withOutput("nvgtmkfl"))))
.withDestinationSettings(new DataflowDestinationOperationSettings()
.withEndpointRef("kybkchnzimerguekuvqlqiqdvvrt").withDataDestination("cbrh")))))
.withExtendedLocation(new ExtendedLocation().withName(
"/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123")
.withType(ExtendedLocationType.CUSTOM_LOCATION))
.create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iotoperations
# USAGE
python dataflow_create_or_update_maximum_set_gen.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = IoTOperationsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.dataflow.begin_create_or_update(
resource_group_name="rgiotoperations",
instance_name="resource-name123",
dataflow_profile_name="resource-name123",
dataflow_name="resource-name123",
resource={
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation",
},
"properties": {
"mode": "Enabled",
"operations": [
{
"builtInTransformationSettings": {
"datasets": [
{
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
"expression": "aatbwomvflemsxialv",
"inputs": ["mosffpsslifkq"],
"key": "qsfqcgxaxnhfumrsdsokwyv",
"schemaRef": "n",
}
],
"filter": [
{
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
"expression": "n",
"inputs": ["sxmjkbntgb"],
"type": "Filter",
}
],
"map": [
{
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
"expression": "txoiltogsarwkzalsphvlmt",
"inputs": ["xsbxuk"],
"output": "nvgtmkfl",
"type": "NewProperties",
}
],
"schemaRef": "mcdc",
"serializationFormat": "Delta",
},
"destinationSettings": {
"dataDestination": "cbrh",
"endpointRef": "kybkchnzimerguekuvqlqiqdvvrt",
},
"name": "knnafvkwoeakm",
"operationType": "Source",
"sourceSettings": {
"assetRef": "zayyykwmckaocywdkohmu",
"dataSources": ["chkkpymxhp"],
"endpointRef": "iixotodhvhkkfcfyrkoveslqig",
"schemaRef": "pknmdzqll",
"serializationFormat": "Json",
},
}
],
"requestDiskPersistence": "Disabled",
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armiotoperations_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations"
)
// Generated from example definition: 2026-03-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json
func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.DataflowResource{
Properties: &armiotoperations.DataflowProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
RequestDiskPersistence: to.Ptr(armiotoperations.OperationalModeDisabled),
Operations: []*armiotoperations.DataflowOperation{
{
OperationType: to.Ptr(armiotoperations.OperationTypeSource),
Name: to.Ptr("knnafvkwoeakm"),
SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
EndpointRef: to.Ptr("iixotodhvhkkfcfyrkoveslqig"),
AssetRef: to.Ptr("zayyykwmckaocywdkohmu"),
SerializationFormat: to.Ptr(armiotoperations.SourceSerializationFormatJSON),
SchemaRef: to.Ptr("pknmdzqll"),
DataSources: []*string{
to.Ptr("chkkpymxhp"),
},
},
BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatDelta),
SchemaRef: to.Ptr("mcdc"),
Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{
{
Key: to.Ptr("qsfqcgxaxnhfumrsdsokwyv"),
Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."),
SchemaRef: to.Ptr("n"),
Inputs: []*string{
to.Ptr("mosffpsslifkq"),
},
Expression: to.Ptr("aatbwomvflemsxialv"),
},
},
Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{
{
Type: to.Ptr(armiotoperations.FilterTypeFilter),
Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."),
Inputs: []*string{
to.Ptr("sxmjkbntgb"),
},
Expression: to.Ptr("n"),
},
},
Map: []*armiotoperations.DataflowBuiltInTransformationMap{
{
Type: to.Ptr(armiotoperations.DataflowMappingTypeNewProperties),
Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."),
Inputs: []*string{
to.Ptr("xsbxuk"),
},
Expression: to.Ptr("txoiltogsarwkzalsphvlmt"),
Output: to.Ptr("nvgtmkfl"),
},
},
},
DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
EndpointRef: to.Ptr("kybkchnzimerguekuvqlqiqdvvrt"),
DataDestination: to.Ptr("cbrh"),
},
},
},
},
ExtendedLocation: &armiotoperations.ExtendedLocation{
Name: to.Ptr("/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123"),
Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armiotoperations.DataflowClientCreateOrUpdateResponse{
// DataflowResource: &armiotoperations.DataflowResource{
// Properties: &armiotoperations.DataflowProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// RequestDiskPersistence: to.Ptr(armiotoperations.OperationalModeDisabled),
// Operations: []*armiotoperations.DataflowOperation{
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeSource),
// Name: to.Ptr("knnafvkwoeakm"),
// SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
// EndpointRef: to.Ptr("iixotodhvhkkfcfyrkoveslqig"),
// AssetRef: to.Ptr("zayyykwmckaocywdkohmu"),
// SerializationFormat: to.Ptr(armiotoperations.SourceSerializationFormatJSON),
// SchemaRef: to.Ptr("pknmdzqll"),
// DataSources: []*string{
// to.Ptr("chkkpymxhp"),
// },
// },
// BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
// SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatDelta),
// SchemaRef: to.Ptr("mcdc"),
// Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{
// {
// Key: to.Ptr("qsfqcgxaxnhfumrsdsokwyv"),
// Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."),
// SchemaRef: to.Ptr("n"),
// Inputs: []*string{
// to.Ptr("mosffpsslifkq"),
// },
// Expression: to.Ptr("aatbwomvflemsxialv"),
// },
// },
// Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{
// {
// Type: to.Ptr(armiotoperations.FilterTypeFilter),
// Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."),
// Inputs: []*string{
// to.Ptr("sxmjkbntgb"),
// },
// Expression: to.Ptr("n"),
// },
// },
// Map: []*armiotoperations.DataflowBuiltInTransformationMap{
// {
// Type: to.Ptr(armiotoperations.DataflowMappingTypeNewProperties),
// Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."),
// Inputs: []*string{
// to.Ptr("xsbxuk"),
// },
// Expression: to.Ptr("txoiltogsarwkzalsphvlmt"),
// Output: to.Ptr("nvgtmkfl"),
// },
// },
// },
// DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
// EndpointRef: to.Ptr("kybkchnzimerguekuvqlqiqdvvrt"),
// DataDestination: to.Ptr("cbrh"),
// },
// },
// },
// ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
// },
// ExtendedLocation: &armiotoperations.ExtendedLocation{
// Name: to.Ptr("/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123"),
// Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
// },
// ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"),
// Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"),
// Type: to.Ptr("Microsoft.IoTOperations/instances/dataflowProfiles/dataflows"),
// SystemData: &armiotoperations.SystemData{
// CreatedBy: to.Ptr("contosouser"),
// CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// LastModifiedBy: to.Ptr("contosouser"),
// LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IoTOperationsClient } = require("@azure/arm-iotoperations");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create a DataflowResource
*
* @summary create a DataflowResource
* x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json
*/
async function dataflowCreateOrUpdate() {
const credential = new DefaultAzureCredential();
const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53";
const client = new IoTOperationsClient(credential, subscriptionId);
const result = await client.dataflow.createOrUpdate(
"rgiotoperations",
"resource-name123",
"resource-name123",
"resource-name123",
{
properties: {
mode: "Enabled",
requestDiskPersistence: "Disabled",
operations: [
{
operationType: "Source",
name: "knnafvkwoeakm",
sourceSettings: {
endpointRef: "iixotodhvhkkfcfyrkoveslqig",
assetRef: "zayyykwmckaocywdkohmu",
serializationFormat: "Json",
schemaRef: "pknmdzqll",
dataSources: ["chkkpymxhp"],
},
builtInTransformationSettings: {
serializationFormat: "Delta",
schemaRef: "mcdc",
datasets: [
{
key: "qsfqcgxaxnhfumrsdsokwyv",
description: "Lorem ipsum odor amet, consectetuer adipiscing elit.",
schemaRef: "n",
inputs: ["mosffpsslifkq"],
expression: "aatbwomvflemsxialv",
},
],
filter: [
{
type: "Filter",
description: "Lorem ipsum odor amet, consectetuer adipiscing elit.",
inputs: ["sxmjkbntgb"],
expression: "n",
},
],
map: [
{
type: "NewProperties",
description: "Lorem ipsum odor amet, consectetuer adipiscing elit.",
inputs: ["xsbxuk"],
expression: "txoiltogsarwkzalsphvlmt",
output: "nvgtmkfl",
},
],
},
destinationSettings: {
endpointRef: "kybkchnzimerguekuvqlqiqdvvrt",
dataDestination: "cbrh",
},
},
],
},
extendedLocation: {
name: "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
type: "CustomLocation",
},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"properties": {
"mode": "Enabled",
"requestDiskPersistence": "Disabled",
"operations": [
{
"operationType": "Source",
"name": "knnafvkwoeakm",
"sourceSettings": {
"endpointRef": "iixotodhvhkkfcfyrkoveslqig",
"assetRef": "zayyykwmckaocywdkohmu",
"serializationFormat": "Json",
"schemaRef": "pknmdzqll",
"dataSources": [
"chkkpymxhp"
]
},
"builtInTransformationSettings": {
"serializationFormat": "Delta",
"schemaRef": "mcdc",
"datasets": [
{
"key": "qsfqcgxaxnhfumrsdsokwyv",
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
"schemaRef": "n",
"inputs": [
"mosffpsslifkq"
],
"expression": "aatbwomvflemsxialv"
}
],
"filter": [
{
"type": "Filter",
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
"inputs": [
"sxmjkbntgb"
],
"expression": "n"
}
],
"map": [
{
"type": "NewProperties",
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
"inputs": [
"xsbxuk"
],
"expression": "txoiltogsarwkzalsphvlmt",
"output": "nvgtmkfl"
}
]
},
"destinationSettings": {
"endpointRef": "kybkchnzimerguekuvqlqiqdvvrt",
"dataDestination": "cbrh"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123",
"name": "jxhcpwgfkxqasbexkookvxk",
"type": "Microsoft.IoTOperations/instances/dataflowProfiles/dataflows",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"mode": "Enabled",
"requestDiskPersistence": "Disabled",
"operations": [
{
"operationType": "Source",
"name": "knnafvkwoeakm",
"sourceSettings": {
"endpointRef": "iixotodhvhkkfcfyrkoveslqig",
"assetRef": "zayyykwmckaocywdkohmu",
"serializationFormat": "Json",
"schemaRef": "pknmdzqll",
"dataSources": [
"chkkpymxhp"
]
},
"builtInTransformationSettings": {
"serializationFormat": "Delta",
"schemaRef": "mcdc",
"datasets": [
{
"key": "qsfqcgxaxnhfumrsdsokwyv",
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
"schemaRef": "n",
"inputs": [
"mosffpsslifkq"
],
"expression": "aatbwomvflemsxialv"
}
],
"filter": [
{
"type": "Filter",
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
"inputs": [
"sxmjkbntgb"
],
"expression": "n"
}
],
"map": [
{
"type": "NewProperties",
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
"inputs": [
"xsbxuk"
],
"expression": "txoiltogsarwkzalsphvlmt",
"output": "nvgtmkfl"
}
]
},
"destinationSettings": {
"endpointRef": "kybkchnzimerguekuvqlqiqdvvrt",
"dataDestination": "cbrh"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123",
"name": "jxhcpwgfkxqasbexkookvxk",
"type": "Microsoft.IoTOperations/instances/dataflowProfiles/dataflows",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Dataflow_CreateOrUpdate_ComplexContextualization
Sample request
PUT https://management.azure.com/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/aio-to-adx-contexualized?api-version=2026-03-01
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"azure-iot-operations/data/thermostat"
]
}
},
{
"operationType": "BuiltInTransformation",
"name": "transformation1",
"builtInTransformationSettings": {
"map": [
{
"inputs": [
"*"
],
"output": "*"
},
{
"inputs": [
"$context(quality).*"
],
"output": "enriched.*"
}
],
"datasets": [
{
"key": "quality",
"inputs": [
"$source.country",
"$context.country"
],
"expression": "$1 == $2"
}
]
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "adx-endpoint",
"dataDestination": "mytable"
}
}
]
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
}
}
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationDataset;
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationMap;
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationSettings;
import com.azure.resourcemanager.iotoperations.models.DataflowDestinationOperationSettings;
import com.azure.resourcemanager.iotoperations.models.DataflowOperation;
import com.azure.resourcemanager.iotoperations.models.DataflowProperties;
import com.azure.resourcemanager.iotoperations.models.DataflowSourceOperationSettings;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocation;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType;
import com.azure.resourcemanager.iotoperations.models.OperationType;
import com.azure.resourcemanager.iotoperations.models.OperationalMode;
import java.util.Arrays;
/**
* Samples for Dataflow CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_ComplexContextualization.json
*/
/**
* Sample code: Dataflow_CreateOrUpdate_ComplexContextualization.
*
* @param manager Entry point to IoTOperationsManager.
*/
public static void dataflowCreateOrUpdateComplexContextualization(
com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) {
manager.dataflows().define("aio-to-adx-contexualized")
.withExistingDataflowProfile("rgiotoperations", "resource-name123",
"resource-name123")
.withProperties(
new DataflowProperties().withMode(OperationalMode.ENABLED)
.withOperations(
Arrays.asList(
new DataflowOperation().withOperationType(OperationType.SOURCE).withName("source1")
.withSourceSettings(new DataflowSourceOperationSettings()
.withEndpointRef("aio-builtin-broker-endpoint").withDataSources(
Arrays.asList("azure-iot-operations/data/thermostat"))),
new DataflowOperation().withOperationType(OperationType.BUILT_IN_TRANSFORMATION)
.withName("transformation1")
.withBuiltInTransformationSettings(new DataflowBuiltInTransformationSettings()
.withDatasets(Arrays.asList(
new DataflowBuiltInTransformationDataset().withKey("fakeTokenPlaceholder")
.withInputs(Arrays.asList("$source.country", "$context.country"))
.withExpression("$1 == $2")))
.withMap(Arrays.asList(
new DataflowBuiltInTransformationMap().withInputs(Arrays.asList("*"))
.withOutput("*"),
new DataflowBuiltInTransformationMap()
.withInputs(Arrays.asList("$context(quality).*"))
.withOutput("enriched.*")))),
new DataflowOperation().withOperationType(OperationType.DESTINATION)
.withName("destination1")
.withDestinationSettings(new DataflowDestinationOperationSettings()
.withEndpointRef("adx-endpoint").withDataDestination("mytable")))))
.withExtendedLocation(new ExtendedLocation().withName(
"/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123")
.withType(ExtendedLocationType.CUSTOM_LOCATION))
.create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iotoperations
# USAGE
python dataflow_create_or_update_complex_contextualization.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = IoTOperationsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.dataflow.begin_create_or_update(
resource_group_name="rgiotoperations",
instance_name="resource-name123",
dataflow_profile_name="resource-name123",
dataflow_name="aio-to-adx-contexualized",
resource={
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation",
},
"properties": {
"mode": "Enabled",
"operations": [
{
"name": "source1",
"operationType": "Source",
"sourceSettings": {
"dataSources": ["azure-iot-operations/data/thermostat"],
"endpointRef": "aio-builtin-broker-endpoint",
},
},
{
"builtInTransformationSettings": {
"datasets": [
{
"expression": "$1 == $2",
"inputs": ["$source.country", "$context.country"],
"key": "quality",
}
],
"map": [
{"inputs": ["*"], "output": "*"},
{"inputs": ["$context(quality).*"], "output": "enriched.*"},
],
},
"name": "transformation1",
"operationType": "BuiltInTransformation",
},
{
"destinationSettings": {"dataDestination": "mytable", "endpointRef": "adx-endpoint"},
"name": "destination1",
"operationType": "Destination",
},
],
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_ComplexContextualization.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armiotoperations_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations"
)
// Generated from example definition: 2026-03-01/Dataflow_CreateOrUpdate_ComplexContextualization.json
func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateComplexContextualization() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "aio-to-adx-contexualized", armiotoperations.DataflowResource{
Properties: &armiotoperations.DataflowProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
Operations: []*armiotoperations.DataflowOperation{
{
OperationType: to.Ptr(armiotoperations.OperationTypeSource),
Name: to.Ptr("source1"),
SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
DataSources: []*string{
to.Ptr("azure-iot-operations/data/thermostat"),
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
Name: to.Ptr("transformation1"),
BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
Map: []*armiotoperations.DataflowBuiltInTransformationMap{
{
Inputs: []*string{
to.Ptr("*"),
},
Output: to.Ptr("*"),
},
{
Inputs: []*string{
to.Ptr("$context(quality).*"),
},
Output: to.Ptr("enriched.*"),
},
},
Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{
{
Key: to.Ptr("quality"),
Inputs: []*string{
to.Ptr("$source.country"),
to.Ptr("$context.country"),
},
Expression: to.Ptr("$1 == $2"),
},
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
Name: to.Ptr("destination1"),
DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
EndpointRef: to.Ptr("adx-endpoint"),
DataDestination: to.Ptr("mytable"),
},
},
},
},
ExtendedLocation: &armiotoperations.ExtendedLocation{
Name: to.Ptr("/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123"),
Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armiotoperations.DataflowClientCreateOrUpdateResponse{
// DataflowResource: &armiotoperations.DataflowResource{
// Properties: &armiotoperations.DataflowProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// Operations: []*armiotoperations.DataflowOperation{
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeSource),
// Name: to.Ptr("source1"),
// SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
// EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
// DataSources: []*string{
// to.Ptr("azure-iot-operations/data/thermostat"),
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
// Name: to.Ptr("transformation1"),
// BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
// Map: []*armiotoperations.DataflowBuiltInTransformationMap{
// {
// Inputs: []*string{
// to.Ptr("*"),
// },
// Output: to.Ptr("*"),
// },
// {
// Inputs: []*string{
// to.Ptr("$context(quality).*"),
// },
// Output: to.Ptr("enriched.*"),
// },
// },
// Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{
// {
// Key: to.Ptr("quality"),
// Inputs: []*string{
// to.Ptr("$source.country"),
// to.Ptr("$context.country"),
// },
// Expression: to.Ptr("$1 == $2"),
// },
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
// Name: to.Ptr("destination1"),
// DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
// EndpointRef: to.Ptr("adx-endpoint"),
// DataDestination: to.Ptr("mytable"),
// },
// },
// },
// ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
// },
// ExtendedLocation: &armiotoperations.ExtendedLocation{
// Name: to.Ptr("/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123"),
// Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
// },
// ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"),
// Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"),
// Type: to.Ptr("Microsoft.IoTOperations/instances/dataflowProfiles/dataflows"),
// SystemData: &armiotoperations.SystemData{
// CreatedBy: to.Ptr("contosouser"),
// CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// LastModifiedBy: to.Ptr("contosouser"),
// LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IoTOperationsClient } = require("@azure/arm-iotoperations");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create a DataflowResource
*
* @summary create a DataflowResource
* x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_ComplexContextualization.json
*/
async function dataflowCreateOrUpdateComplexContextualization() {
const credential = new DefaultAzureCredential();
const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53";
const client = new IoTOperationsClient(credential, subscriptionId);
const result = await client.dataflow.createOrUpdate(
"rgiotoperations",
"resource-name123",
"resource-name123",
"aio-to-adx-contexualized",
{
properties: {
mode: "Enabled",
operations: [
{
operationType: "Source",
name: "source1",
sourceSettings: {
endpointRef: "aio-builtin-broker-endpoint",
dataSources: ["azure-iot-operations/data/thermostat"],
},
},
{
operationType: "BuiltInTransformation",
name: "transformation1",
builtInTransformationSettings: {
map: [
{ inputs: ["*"], output: "*" },
{ inputs: ["$context(quality).*"], output: "enriched.*" },
],
datasets: [
{
key: "quality",
inputs: ["$source.country", "$context.country"],
expression: "$1 == $2",
},
],
},
},
{
operationType: "Destination",
name: "destination1",
destinationSettings: { endpointRef: "adx-endpoint", dataDestination: "mytable" },
},
],
},
extendedLocation: {
name: "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
type: "CustomLocation",
},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"azure-iot-operations/data/thermostat"
]
}
},
{
"operationType": "BuiltInTransformation",
"name": "transformation1",
"builtInTransformationSettings": {
"map": [
{
"inputs": [
"*"
],
"output": "*"
},
{
"inputs": [
"$context(quality).*"
],
"output": "enriched.*"
}
],
"datasets": [
{
"key": "quality",
"inputs": [
"$source.country",
"$context.country"
],
"expression": "$1 == $2"
}
]
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "adx-endpoint",
"dataDestination": "mytable"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123",
"name": "jxhcpwgfkxqasbexkookvxk",
"type": "Microsoft.IoTOperations/instances/dataflowProfiles/dataflows",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"azure-iot-operations/data/thermostat"
]
}
},
{
"operationType": "BuiltInTransformation",
"name": "transformation1",
"builtInTransformationSettings": {
"map": [
{
"inputs": [
"*"
],
"output": "*"
},
{
"inputs": [
"$context(quality).*"
],
"output": "enriched.*"
}
],
"datasets": [
{
"key": "quality",
"inputs": [
"$source.country",
"$context.country"
],
"expression": "$1 == $2"
}
]
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "adx-endpoint",
"dataDestination": "mytable"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123",
"name": "jxhcpwgfkxqasbexkookvxk",
"type": "Microsoft.IoTOperations/instances/dataflowProfiles/dataflows",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Dataflow_CreateOrUpdate_ComplexEventHub
Sample request
PUT https://management.azure.com/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/aio-to-event-hub-transformed?api-version=2026-03-01
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"azure-iot-operations/data/thermostat"
]
}
},
{
"operationType": "BuiltInTransformation",
"builtInTransformationSettings": {
"filter": [
{
"inputs": [
"temperature.Value",
"\"Tag 10\".Value"
],
"expression": "$1 > 9000 && $2 >= 8000"
}
],
"map": [
{
"inputs": [
"*"
],
"output": "*"
},
{
"inputs": [
"temperature.Value",
"\"Tag 10\".Value"
],
"expression": "($1+$2)/2",
"output": "AvgTemp.Value"
},
{
"inputs": [],
"expression": "true",
"output": "dataflow-processed"
},
{
"inputs": [
"temperature.SourceTimestamp"
],
"expression": "",
"output": ""
},
{
"inputs": [
"\"Tag 10\""
],
"expression": "",
"output": "pressure"
},
{
"inputs": [
"temperature.Value"
],
"expression": "cToF($1)",
"output": "temperatureF.Value"
},
{
"inputs": [
"\"Tag 10\".Value"
],
"expression": "scale ($1,0,10,0,100)",
"output": "\"Scale Tag 10\".Value"
}
]
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "event-hub-endpoint",
"dataDestination": "myuniqueeventhub"
}
}
]
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
}
}
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationFilter;
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationMap;
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationSettings;
import com.azure.resourcemanager.iotoperations.models.DataflowDestinationOperationSettings;
import com.azure.resourcemanager.iotoperations.models.DataflowOperation;
import com.azure.resourcemanager.iotoperations.models.DataflowProperties;
import com.azure.resourcemanager.iotoperations.models.DataflowSourceOperationSettings;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocation;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType;
import com.azure.resourcemanager.iotoperations.models.OperationType;
import com.azure.resourcemanager.iotoperations.models.OperationalMode;
import java.util.Arrays;
/**
* Samples for Dataflow CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_ComplexEventHub.json
*/
/**
* Sample code: Dataflow_CreateOrUpdate_ComplexEventHub.
*
* @param manager Entry point to IoTOperationsManager.
*/
public static void
dataflowCreateOrUpdateComplexEventHub(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) {
manager.dataflows().define("aio-to-event-hub-transformed")
.withExistingDataflowProfile("rgiotoperations", "resource-name123",
"resource-name123")
.withProperties(
new DataflowProperties().withMode(OperationalMode.ENABLED)
.withOperations(
Arrays
.asList(
new DataflowOperation().withOperationType(OperationType.SOURCE).withName("source1")
.withSourceSettings(new DataflowSourceOperationSettings()
.withEndpointRef("aio-builtin-broker-endpoint").withDataSources(Arrays
.asList("azure-iot-operations/data/thermostat"))),
new DataflowOperation().withOperationType(OperationType.BUILT_IN_TRANSFORMATION)
.withBuiltInTransformationSettings(new DataflowBuiltInTransformationSettings()
.withFilter(Arrays.asList(new DataflowBuiltInTransformationFilter()
.withInputs(Arrays.asList("temperature.Value", "\"Tag 10\".Value"))
.withExpression("$1 > 9000 && $2 >= 8000")))
.withMap(Arrays.asList(
new DataflowBuiltInTransformationMap().withInputs(Arrays.asList("*"))
.withOutput("*"),
new DataflowBuiltInTransformationMap()
.withInputs(Arrays.asList("temperature.Value", "\"Tag 10\".Value"))
.withExpression("($1+$2)/2").withOutput("AvgTemp.Value"),
new DataflowBuiltInTransformationMap().withInputs(Arrays.asList())
.withExpression("true").withOutput("dataflow-processed"),
new DataflowBuiltInTransformationMap()
.withInputs(Arrays.asList("temperature.SourceTimestamp"))
.withExpression("").withOutput(""),
new DataflowBuiltInTransformationMap()
.withInputs(Arrays.asList("\"Tag 10\"")).withExpression("")
.withOutput("pressure"),
new DataflowBuiltInTransformationMap()
.withInputs(Arrays.asList("temperature.Value"))
.withExpression("cToF($1)").withOutput("temperatureF.Value"),
new DataflowBuiltInTransformationMap()
.withInputs(Arrays.asList("\"Tag 10\".Value"))
.withExpression("scale ($1,0,10,0,100)")
.withOutput("\"Scale Tag 10\".Value")))),
new DataflowOperation().withOperationType(OperationType.DESTINATION)
.withName("destination1").withDestinationSettings(
new DataflowDestinationOperationSettings().withEndpointRef("event-hub-endpoint")
.withDataDestination("myuniqueeventhub")))))
.withExtendedLocation(new ExtendedLocation().withName(
"/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123")
.withType(ExtendedLocationType.CUSTOM_LOCATION))
.create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iotoperations
# USAGE
python dataflow_create_or_update_complex_event_hub.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = IoTOperationsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.dataflow.begin_create_or_update(
resource_group_name="rgiotoperations",
instance_name="resource-name123",
dataflow_profile_name="resource-name123",
dataflow_name="aio-to-event-hub-transformed",
resource={
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation",
},
"properties": {
"mode": "Enabled",
"operations": [
{
"name": "source1",
"operationType": "Source",
"sourceSettings": {
"dataSources": ["azure-iot-operations/data/thermostat"],
"endpointRef": "aio-builtin-broker-endpoint",
},
},
{
"builtInTransformationSettings": {
"filter": [
{
"expression": "$1 > 9000 && $2 >= 8000",
"inputs": ["temperature.Value", '"Tag 10".Value'],
}
],
"map": [
{"inputs": ["*"], "output": "*"},
{
"expression": "($1+$2)/2",
"inputs": ["temperature.Value", '"Tag 10".Value'],
"output": "AvgTemp.Value",
},
{"expression": "true", "inputs": [], "output": "dataflow-processed"},
{"expression": "", "inputs": ["temperature.SourceTimestamp"], "output": ""},
{"expression": "", "inputs": ['"Tag 10"'], "output": "pressure"},
{
"expression": "cToF($1)",
"inputs": ["temperature.Value"],
"output": "temperatureF.Value",
},
{
"expression": "scale ($1,0,10,0,100)",
"inputs": ['"Tag 10".Value'],
"output": '"Scale Tag 10".Value',
},
],
},
"operationType": "BuiltInTransformation",
},
{
"destinationSettings": {
"dataDestination": "myuniqueeventhub",
"endpointRef": "event-hub-endpoint",
},
"name": "destination1",
"operationType": "Destination",
},
],
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_ComplexEventHub.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armiotoperations_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations"
)
// Generated from example definition: 2026-03-01/Dataflow_CreateOrUpdate_ComplexEventHub.json
func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateComplexEventHub() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "aio-to-event-hub-transformed", armiotoperations.DataflowResource{
Properties: &armiotoperations.DataflowProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
Operations: []*armiotoperations.DataflowOperation{
{
OperationType: to.Ptr(armiotoperations.OperationTypeSource),
Name: to.Ptr("source1"),
SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
DataSources: []*string{
to.Ptr("azure-iot-operations/data/thermostat"),
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{
{
Inputs: []*string{
to.Ptr("temperature.Value"),
to.Ptr("\"Tag 10\".Value"),
},
Expression: to.Ptr("$1 > 9000 && $2 >= 8000"),
},
},
Map: []*armiotoperations.DataflowBuiltInTransformationMap{
{
Inputs: []*string{
to.Ptr("*"),
},
Output: to.Ptr("*"),
},
{
Inputs: []*string{
to.Ptr("temperature.Value"),
to.Ptr("\"Tag 10\".Value"),
},
Expression: to.Ptr("($1+$2)/2"),
Output: to.Ptr("AvgTemp.Value"),
},
{
Inputs: []*string{},
Expression: to.Ptr("true"),
Output: to.Ptr("dataflow-processed"),
},
{
Inputs: []*string{
to.Ptr("temperature.SourceTimestamp"),
},
Expression: to.Ptr(""),
Output: to.Ptr(""),
},
{
Inputs: []*string{
to.Ptr("\"Tag 10\""),
},
Expression: to.Ptr(""),
Output: to.Ptr("pressure"),
},
{
Inputs: []*string{
to.Ptr("temperature.Value"),
},
Expression: to.Ptr("cToF($1)"),
Output: to.Ptr("temperatureF.Value"),
},
{
Inputs: []*string{
to.Ptr("\"Tag 10\".Value"),
},
Expression: to.Ptr("scale ($1,0,10,0,100)"),
Output: to.Ptr("\"Scale Tag 10\".Value"),
},
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
Name: to.Ptr("destination1"),
DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
EndpointRef: to.Ptr("event-hub-endpoint"),
DataDestination: to.Ptr("myuniqueeventhub"),
},
},
},
},
ExtendedLocation: &armiotoperations.ExtendedLocation{
Name: to.Ptr("/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123"),
Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armiotoperations.DataflowClientCreateOrUpdateResponse{
// DataflowResource: &armiotoperations.DataflowResource{
// Properties: &armiotoperations.DataflowProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// Operations: []*armiotoperations.DataflowOperation{
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeSource),
// Name: to.Ptr("source1"),
// SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
// EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
// DataSources: []*string{
// to.Ptr("azure-iot-operations/data/thermostat"),
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
// Name: to.Ptr("transformation1"),
// BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
// Map: []*armiotoperations.DataflowBuiltInTransformationMap{
// {
// Inputs: []*string{
// to.Ptr("*"),
// },
// Output: to.Ptr("*"),
// },
// {
// Inputs: []*string{
// to.Ptr("$context(quality).*"),
// },
// Output: to.Ptr("enriched.*"),
// },
// },
// Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{
// {
// Key: to.Ptr("quality"),
// Inputs: []*string{
// to.Ptr("$source.country"),
// to.Ptr("$context.country"),
// },
// Expression: to.Ptr("$1 == $2"),
// },
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
// Name: to.Ptr("destination1"),
// DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
// EndpointRef: to.Ptr("adx-endpoint"),
// DataDestination: to.Ptr("mytable"),
// },
// },
// },
// ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
// },
// ExtendedLocation: &armiotoperations.ExtendedLocation{
// Name: to.Ptr("/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123"),
// Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
// },
// ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"),
// Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"),
// Type: to.Ptr("Microsoft.IoTOperations/instances/dataflowProfiles/dataflows"),
// SystemData: &armiotoperations.SystemData{
// CreatedBy: to.Ptr("contosouser"),
// CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// LastModifiedBy: to.Ptr("contosouser"),
// LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IoTOperationsClient } = require("@azure/arm-iotoperations");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create a DataflowResource
*
* @summary create a DataflowResource
* x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_ComplexEventHub.json
*/
async function dataflowCreateOrUpdateComplexEventHub() {
const credential = new DefaultAzureCredential();
const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53";
const client = new IoTOperationsClient(credential, subscriptionId);
const result = await client.dataflow.createOrUpdate(
"rgiotoperations",
"resource-name123",
"resource-name123",
"aio-to-event-hub-transformed",
{
properties: {
mode: "Enabled",
operations: [
{
operationType: "Source",
name: "source1",
sourceSettings: {
endpointRef: "aio-builtin-broker-endpoint",
dataSources: ["azure-iot-operations/data/thermostat"],
},
},
{
operationType: "BuiltInTransformation",
builtInTransformationSettings: {
filter: [
{
inputs: ["temperature.Value", '"Tag 10".Value'],
expression: "$1 > 9000 && $2 >= 8000",
},
],
map: [
{ inputs: ["*"], output: "*" },
{
inputs: ["temperature.Value", '"Tag 10".Value'],
expression: "($1+$2)/2",
output: "AvgTemp.Value",
},
{ inputs: [], expression: "true", output: "dataflow-processed" },
{ inputs: ["temperature.SourceTimestamp"], expression: "", output: "" },
{ inputs: ['"Tag 10"'], expression: "", output: "pressure" },
{
inputs: ["temperature.Value"],
expression: "cToF($1)",
output: "temperatureF.Value",
},
{
inputs: ['"Tag 10".Value'],
expression: "scale ($1,0,10,0,100)",
output: '"Scale Tag 10".Value',
},
],
},
},
{
operationType: "Destination",
name: "destination1",
destinationSettings: {
endpointRef: "event-hub-endpoint",
dataDestination: "myuniqueeventhub",
},
},
],
},
extendedLocation: {
name: "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
type: "CustomLocation",
},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"azure-iot-operations/data/thermostat"
]
}
},
{
"operationType": "BuiltInTransformation",
"name": "transformation1",
"builtInTransformationSettings": {
"map": [
{
"inputs": [
"*"
],
"output": "*"
},
{
"inputs": [
"$context(quality).*"
],
"output": "enriched.*"
}
],
"datasets": [
{
"key": "quality",
"inputs": [
"$source.country",
"$context.country"
],
"expression": "$1 == $2"
}
]
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "adx-endpoint",
"dataDestination": "mytable"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123",
"name": "jxhcpwgfkxqasbexkookvxk",
"type": "Microsoft.IoTOperations/instances/dataflowProfiles/dataflows",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"azure-iot-operations/data/thermostat"
]
}
},
{
"operationType": "BuiltInTransformation",
"name": "transformation1",
"builtInTransformationSettings": {
"map": [
{
"inputs": [
"*"
],
"output": "*"
},
{
"inputs": [
"$context(quality).*"
],
"output": "enriched.*"
}
],
"datasets": [
{
"key": "quality",
"inputs": [
"$source.country",
"$context.country"
],
"expression": "$1 == $2"
}
]
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "adx-endpoint",
"dataDestination": "mytable"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123",
"name": "jxhcpwgfkxqasbexkookvxk",
"type": "Microsoft.IoTOperations/instances/dataflowProfiles/dataflows",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Dataflow_CreateOrUpdate_FilterToTopic
Sample request
PUT https://management.azure.com/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/mqtt-filter-to-topic?api-version=2026-03-01
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"azure-iot-operations/data/thermostat"
]
}
},
{
"operationType": "BuiltInTransformation",
"name": "transformation1",
"builtInTransformationSettings": {
"filter": [
{
"type": "Filter",
"description": "filter-datapoint",
"inputs": [
"temperature.Value",
"\"Tag 10\".Value"
],
"expression": "$1 > 9000 && $2 >= 8000"
}
],
"map": [
{
"type": "PassThrough",
"inputs": [
"*"
],
"output": "*"
}
]
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataDestination": "data/filtered/thermostat"
}
}
]
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
}
}
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationFilter;
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationMap;
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationSettings;
import com.azure.resourcemanager.iotoperations.models.DataflowDestinationOperationSettings;
import com.azure.resourcemanager.iotoperations.models.DataflowMappingType;
import com.azure.resourcemanager.iotoperations.models.DataflowOperation;
import com.azure.resourcemanager.iotoperations.models.DataflowProperties;
import com.azure.resourcemanager.iotoperations.models.DataflowSourceOperationSettings;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocation;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType;
import com.azure.resourcemanager.iotoperations.models.FilterType;
import com.azure.resourcemanager.iotoperations.models.OperationType;
import com.azure.resourcemanager.iotoperations.models.OperationalMode;
import java.util.Arrays;
/**
* Samples for Dataflow CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_FilterToTopic.json
*/
/**
* Sample code: Dataflow_CreateOrUpdate_FilterToTopic.
*
* @param manager Entry point to IoTOperationsManager.
*/
public static void
dataflowCreateOrUpdateFilterToTopic(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) {
manager.dataflows().define("mqtt-filter-to-topic")
.withExistingDataflowProfile("rgiotoperations", "resource-name123",
"resource-name123")
.withProperties(
new DataflowProperties().withMode(OperationalMode.ENABLED)
.withOperations(
Arrays.asList(
new DataflowOperation().withOperationType(OperationType.SOURCE).withName("source1")
.withSourceSettings(new DataflowSourceOperationSettings()
.withEndpointRef("aio-builtin-broker-endpoint").withDataSources(
Arrays.asList("azure-iot-operations/data/thermostat"))),
new DataflowOperation().withOperationType(OperationType.BUILT_IN_TRANSFORMATION)
.withName("transformation1")
.withBuiltInTransformationSettings(new DataflowBuiltInTransformationSettings()
.withFilter(Arrays.asList(new DataflowBuiltInTransformationFilter()
.withType(FilterType.FILTER).withDescription("filter-datapoint")
.withInputs(Arrays.asList("temperature.Value", "\"Tag 10\".Value"))
.withExpression("$1 > 9000 && $2 >= 8000")))
.withMap(Arrays.asList(new DataflowBuiltInTransformationMap()
.withType(DataflowMappingType.PASS_THROUGH).withInputs(Arrays.asList("*"))
.withOutput("*")))),
new DataflowOperation().withOperationType(OperationType.DESTINATION)
.withName("destination1")
.withDestinationSettings(new DataflowDestinationOperationSettings()
.withEndpointRef("aio-builtin-broker-endpoint")
.withDataDestination("data/filtered/thermostat")))))
.withExtendedLocation(new ExtendedLocation().withName(
"/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123")
.withType(ExtendedLocationType.CUSTOM_LOCATION))
.create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iotoperations
# USAGE
python dataflow_create_or_update_filter_to_topic.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = IoTOperationsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.dataflow.begin_create_or_update(
resource_group_name="rgiotoperations",
instance_name="resource-name123",
dataflow_profile_name="resource-name123",
dataflow_name="mqtt-filter-to-topic",
resource={
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation",
},
"properties": {
"mode": "Enabled",
"operations": [
{
"name": "source1",
"operationType": "Source",
"sourceSettings": {
"dataSources": ["azure-iot-operations/data/thermostat"],
"endpointRef": "aio-builtin-broker-endpoint",
},
},
{
"builtInTransformationSettings": {
"filter": [
{
"description": "filter-datapoint",
"expression": "$1 > 9000 && $2 >= 8000",
"inputs": ["temperature.Value", '"Tag 10".Value'],
"type": "Filter",
}
],
"map": [{"inputs": ["*"], "output": "*", "type": "PassThrough"}],
},
"name": "transformation1",
"operationType": "BuiltInTransformation",
},
{
"destinationSettings": {
"dataDestination": "data/filtered/thermostat",
"endpointRef": "aio-builtin-broker-endpoint",
},
"name": "destination1",
"operationType": "Destination",
},
],
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_FilterToTopic.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armiotoperations_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations"
)
// Generated from example definition: 2026-03-01/Dataflow_CreateOrUpdate_FilterToTopic.json
func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateFilterToTopic() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "mqtt-filter-to-topic", armiotoperations.DataflowResource{
Properties: &armiotoperations.DataflowProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
Operations: []*armiotoperations.DataflowOperation{
{
OperationType: to.Ptr(armiotoperations.OperationTypeSource),
Name: to.Ptr("source1"),
SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
DataSources: []*string{
to.Ptr("azure-iot-operations/data/thermostat"),
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
Name: to.Ptr("transformation1"),
BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{
{
Type: to.Ptr(armiotoperations.FilterTypeFilter),
Description: to.Ptr("filter-datapoint"),
Inputs: []*string{
to.Ptr("temperature.Value"),
to.Ptr("\"Tag 10\".Value"),
},
Expression: to.Ptr("$1 > 9000 && $2 >= 8000"),
},
},
Map: []*armiotoperations.DataflowBuiltInTransformationMap{
{
Type: to.Ptr(armiotoperations.DataflowMappingTypePassThrough),
Inputs: []*string{
to.Ptr("*"),
},
Output: to.Ptr("*"),
},
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
Name: to.Ptr("destination1"),
DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
DataDestination: to.Ptr("data/filtered/thermostat"),
},
},
},
},
ExtendedLocation: &armiotoperations.ExtendedLocation{
Name: to.Ptr("/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123"),
Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armiotoperations.DataflowClientCreateOrUpdateResponse{
// DataflowResource: &armiotoperations.DataflowResource{
// Properties: &armiotoperations.DataflowProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// Operations: []*armiotoperations.DataflowOperation{
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeSource),
// Name: to.Ptr("source1"),
// SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
// EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
// DataSources: []*string{
// to.Ptr("azure-iot-operations/data/thermostat"),
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
// Name: to.Ptr("transformation1"),
// BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
// Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{
// {
// Type: to.Ptr(armiotoperations.FilterTypeFilter),
// Description: to.Ptr("filter-datapoint"),
// Inputs: []*string{
// to.Ptr("temperature.Value"),
// to.Ptr("\"Tag 10\".Value"),
// },
// Expression: to.Ptr("$1 > 9000 && $2 >= 8000"),
// },
// },
// Map: []*armiotoperations.DataflowBuiltInTransformationMap{
// {
// Type: to.Ptr(armiotoperations.DataflowMappingTypePassThrough),
// Inputs: []*string{
// to.Ptr("*"),
// },
// Output: to.Ptr("*"),
// },
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
// Name: to.Ptr("destination1"),
// DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
// EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
// DataDestination: to.Ptr("data/filtered/thermostat"),
// },
// },
// },
// ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
// },
// ExtendedLocation: &armiotoperations.ExtendedLocation{
// Name: to.Ptr("/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123"),
// Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
// },
// ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"),
// Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"),
// Type: to.Ptr("Microsoft.IoTOperations/instances/dataflowProfiles/dataflows"),
// SystemData: &armiotoperations.SystemData{
// CreatedBy: to.Ptr("contosouser"),
// CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// LastModifiedBy: to.Ptr("contosouser"),
// LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IoTOperationsClient } = require("@azure/arm-iotoperations");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create a DataflowResource
*
* @summary create a DataflowResource
* x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_FilterToTopic.json
*/
async function dataflowCreateOrUpdateFilterToTopic() {
const credential = new DefaultAzureCredential();
const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53";
const client = new IoTOperationsClient(credential, subscriptionId);
const result = await client.dataflow.createOrUpdate(
"rgiotoperations",
"resource-name123",
"resource-name123",
"mqtt-filter-to-topic",
{
properties: {
mode: "Enabled",
operations: [
{
operationType: "Source",
name: "source1",
sourceSettings: {
endpointRef: "aio-builtin-broker-endpoint",
dataSources: ["azure-iot-operations/data/thermostat"],
},
},
{
operationType: "BuiltInTransformation",
name: "transformation1",
builtInTransformationSettings: {
filter: [
{
type: "Filter",
description: "filter-datapoint",
inputs: ["temperature.Value", '"Tag 10".Value'],
expression: "$1 > 9000 && $2 >= 8000",
},
],
map: [{ type: "PassThrough", inputs: ["*"], output: "*" }],
},
},
{
operationType: "Destination",
name: "destination1",
destinationSettings: {
endpointRef: "aio-builtin-broker-endpoint",
dataDestination: "data/filtered/thermostat",
},
},
],
},
extendedLocation: {
name: "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
type: "CustomLocation",
},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"azure-iot-operations/data/thermostat"
]
}
},
{
"operationType": "BuiltInTransformation",
"name": "transformation1",
"builtInTransformationSettings": {
"filter": [
{
"type": "Filter",
"description": "filter-datapoint",
"inputs": [
"temperature.Value",
"\"Tag 10\".Value"
],
"expression": "$1 > 9000 && $2 >= 8000"
}
],
"map": [
{
"type": "PassThrough",
"inputs": [
"*"
],
"output": "*"
}
]
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataDestination": "data/filtered/thermostat"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123",
"name": "jxhcpwgfkxqasbexkookvxk",
"type": "Microsoft.IoTOperations/instances/dataflowProfiles/dataflows",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"azure-iot-operations/data/thermostat"
]
}
},
{
"operationType": "BuiltInTransformation",
"name": "transformation1",
"builtInTransformationSettings": {
"filter": [
{
"type": "Filter",
"description": "filter-datapoint",
"inputs": [
"temperature.Value",
"\"Tag 10\".Value"
],
"expression": "$1 > 9000 && $2 >= 8000"
}
],
"map": [
{
"type": "PassThrough",
"inputs": [
"*"
],
"output": "*"
}
]
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataDestination": "data/filtered/thermostat"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123",
"name": "jxhcpwgfkxqasbexkookvxk",
"type": "Microsoft.IoTOperations/instances/dataflowProfiles/dataflows",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Dataflow_CreateOrUpdate_SimpleEventGrid
Sample request
PUT https://management.azure.com/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/aio-to-event-grid?api-version=2026-03-01
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"thermostats/+/telemetry/temperature/#"
]
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "event-grid-endpoint",
"dataDestination": "factory/telemetry"
}
}
]
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
}
}
import com.azure.resourcemanager.iotoperations.models.DataflowDestinationOperationSettings;
import com.azure.resourcemanager.iotoperations.models.DataflowOperation;
import com.azure.resourcemanager.iotoperations.models.DataflowProperties;
import com.azure.resourcemanager.iotoperations.models.DataflowSourceOperationSettings;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocation;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType;
import com.azure.resourcemanager.iotoperations.models.OperationType;
import com.azure.resourcemanager.iotoperations.models.OperationalMode;
import java.util.Arrays;
/**
* Samples for Dataflow CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json
*/
/**
* Sample code: Dataflow_CreateOrUpdate_SimpleEventGrid.
*
* @param manager Entry point to IoTOperationsManager.
*/
public static void
dataflowCreateOrUpdateSimpleEventGrid(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) {
manager.dataflows().define("aio-to-event-grid")
.withExistingDataflowProfile("rgiotoperations", "resource-name123", "resource-name123")
.withProperties(new DataflowProperties().withMode(OperationalMode.ENABLED).withOperations(Arrays.asList(
new DataflowOperation().withOperationType(OperationType.SOURCE).withName("source1").withSourceSettings(
new DataflowSourceOperationSettings().withEndpointRef("aio-builtin-broker-endpoint")
.withDataSources(Arrays.asList("thermostats/+/telemetry/temperature/#"))),
new DataflowOperation().withOperationType(OperationType.DESTINATION).withName("destination1")
.withDestinationSettings(new DataflowDestinationOperationSettings()
.withEndpointRef("event-grid-endpoint").withDataDestination("factory/telemetry")))))
.withExtendedLocation(new ExtendedLocation().withName(
"/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123")
.withType(ExtendedLocationType.CUSTOM_LOCATION))
.create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iotoperations
# USAGE
python dataflow_create_or_update_simple_event_grid.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = IoTOperationsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.dataflow.begin_create_or_update(
resource_group_name="rgiotoperations",
instance_name="resource-name123",
dataflow_profile_name="resource-name123",
dataflow_name="aio-to-event-grid",
resource={
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation",
},
"properties": {
"mode": "Enabled",
"operations": [
{
"name": "source1",
"operationType": "Source",
"sourceSettings": {
"dataSources": ["thermostats/+/telemetry/temperature/#"],
"endpointRef": "aio-builtin-broker-endpoint",
},
},
{
"destinationSettings": {
"dataDestination": "factory/telemetry",
"endpointRef": "event-grid-endpoint",
},
"name": "destination1",
"operationType": "Destination",
},
],
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armiotoperations_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations"
)
// Generated from example definition: 2026-03-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json
func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateSimpleEventGrid() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "aio-to-event-grid", armiotoperations.DataflowResource{
Properties: &armiotoperations.DataflowProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
Operations: []*armiotoperations.DataflowOperation{
{
OperationType: to.Ptr(armiotoperations.OperationTypeSource),
Name: to.Ptr("source1"),
SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
DataSources: []*string{
to.Ptr("thermostats/+/telemetry/temperature/#"),
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
Name: to.Ptr("destination1"),
DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
EndpointRef: to.Ptr("event-grid-endpoint"),
DataDestination: to.Ptr("factory/telemetry"),
},
},
},
},
ExtendedLocation: &armiotoperations.ExtendedLocation{
Name: to.Ptr("/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123"),
Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armiotoperations.DataflowClientCreateOrUpdateResponse{
// DataflowResource: &armiotoperations.DataflowResource{
// Properties: &armiotoperations.DataflowProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// Operations: []*armiotoperations.DataflowOperation{
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeSource),
// Name: to.Ptr("source1"),
// SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
// EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
// DataSources: []*string{
// to.Ptr("thermostats/+/telemetry/temperature/#"),
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
// Name: to.Ptr("destination1"),
// DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
// EndpointRef: to.Ptr("event-grid-endpoint"),
// DataDestination: to.Ptr("factory/telemetry"),
// },
// },
// },
// ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
// },
// ExtendedLocation: &armiotoperations.ExtendedLocation{
// Name: to.Ptr("/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123"),
// Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
// },
// ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"),
// Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"),
// Type: to.Ptr("Microsoft.IoTOperations/instances/dataflowProfiles/dataflows"),
// SystemData: &armiotoperations.SystemData{
// CreatedBy: to.Ptr("contosouser"),
// CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// LastModifiedBy: to.Ptr("contosouser"),
// LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IoTOperationsClient } = require("@azure/arm-iotoperations");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create a DataflowResource
*
* @summary create a DataflowResource
* x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json
*/
async function dataflowCreateOrUpdateSimpleEventGrid() {
const credential = new DefaultAzureCredential();
const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53";
const client = new IoTOperationsClient(credential, subscriptionId);
const result = await client.dataflow.createOrUpdate(
"rgiotoperations",
"resource-name123",
"resource-name123",
"aio-to-event-grid",
{
properties: {
mode: "Enabled",
operations: [
{
operationType: "Source",
name: "source1",
sourceSettings: {
endpointRef: "aio-builtin-broker-endpoint",
dataSources: ["thermostats/+/telemetry/temperature/#"],
},
},
{
operationType: "Destination",
name: "destination1",
destinationSettings: {
endpointRef: "event-grid-endpoint",
dataDestination: "factory/telemetry",
},
},
],
},
extendedLocation: {
name: "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
type: "CustomLocation",
},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"thermostats/+/telemetry/temperature/#"
]
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "event-grid-endpoint",
"dataDestination": "factory/telemetry"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123",
"name": "jxhcpwgfkxqasbexkookvxk",
"type": "Microsoft.IoTOperations/instances/dataflowProfiles/dataflows",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"thermostats/+/telemetry/temperature/#"
]
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "event-grid-endpoint",
"dataDestination": "factory/telemetry"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123",
"name": "jxhcpwgfkxqasbexkookvxk",
"type": "Microsoft.IoTOperations/instances/dataflowProfiles/dataflows",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Dataflow_CreateOrUpdate_SimpleFabric
Sample request
PUT https://management.azure.com/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/aio-to-fabric?api-version=2026-03-01
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"azure-iot-operations/data/thermostat"
]
}
},
{
"operationType": "BuiltInTransformation",
"builtInTransformationSettings": {
"serializationFormat": "Parquet",
"schemaRef": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0"
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "fabric-endpoint",
"dataDestination": "telemetryTable"
}
}
]
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
}
}
import com.azure.resourcemanager.iotoperations.models.DataflowBuiltInTransformationSettings;
import com.azure.resourcemanager.iotoperations.models.DataflowDestinationOperationSettings;
import com.azure.resourcemanager.iotoperations.models.DataflowOperation;
import com.azure.resourcemanager.iotoperations.models.DataflowProperties;
import com.azure.resourcemanager.iotoperations.models.DataflowSourceOperationSettings;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocation;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType;
import com.azure.resourcemanager.iotoperations.models.OperationType;
import com.azure.resourcemanager.iotoperations.models.OperationalMode;
import com.azure.resourcemanager.iotoperations.models.TransformationSerializationFormat;
import java.util.Arrays;
/**
* Samples for Dataflow CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_SimpleFabric.json
*/
/**
* Sample code: Dataflow_CreateOrUpdate_SimpleFabric.
*
* @param manager Entry point to IoTOperationsManager.
*/
public static void
dataflowCreateOrUpdateSimpleFabric(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) {
manager.dataflows().define("aio-to-fabric")
.withExistingDataflowProfile("rgiotoperations", "resource-name123", "resource-name123")
.withProperties(new DataflowProperties().withMode(OperationalMode.ENABLED).withOperations(Arrays.asList(
new DataflowOperation().withOperationType(OperationType.SOURCE).withName("source1").withSourceSettings(
new DataflowSourceOperationSettings().withEndpointRef("aio-builtin-broker-endpoint")
.withDataSources(Arrays.asList("azure-iot-operations/data/thermostat"))),
new DataflowOperation().withOperationType(OperationType.BUILT_IN_TRANSFORMATION)
.withBuiltInTransformationSettings(new DataflowBuiltInTransformationSettings()
.withSerializationFormat(TransformationSerializationFormat.PARQUET)
.withSchemaRef("aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0")),
new DataflowOperation().withOperationType(OperationType.DESTINATION).withName("destination1")
.withDestinationSettings(new DataflowDestinationOperationSettings()
.withEndpointRef("fabric-endpoint").withDataDestination("telemetryTable")))))
.withExtendedLocation(new ExtendedLocation().withName(
"/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123")
.withType(ExtendedLocationType.CUSTOM_LOCATION))
.create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iotoperations
# USAGE
python dataflow_create_or_update_simple_fabric.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = IoTOperationsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.dataflow.begin_create_or_update(
resource_group_name="rgiotoperations",
instance_name="resource-name123",
dataflow_profile_name="resource-name123",
dataflow_name="aio-to-fabric",
resource={
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation",
},
"properties": {
"mode": "Enabled",
"operations": [
{
"name": "source1",
"operationType": "Source",
"sourceSettings": {
"dataSources": ["azure-iot-operations/data/thermostat"],
"endpointRef": "aio-builtin-broker-endpoint",
},
},
{
"builtInTransformationSettings": {
"schemaRef": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0",
"serializationFormat": "Parquet",
},
"operationType": "BuiltInTransformation",
},
{
"destinationSettings": {"dataDestination": "telemetryTable", "endpointRef": "fabric-endpoint"},
"name": "destination1",
"operationType": "Destination",
},
],
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_SimpleFabric.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armiotoperations_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations"
)
// Generated from example definition: 2026-03-01/Dataflow_CreateOrUpdate_SimpleFabric.json
func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateSimpleFabric() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "aio-to-fabric", armiotoperations.DataflowResource{
Properties: &armiotoperations.DataflowProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
Operations: []*armiotoperations.DataflowOperation{
{
OperationType: to.Ptr(armiotoperations.OperationTypeSource),
Name: to.Ptr("source1"),
SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
DataSources: []*string{
to.Ptr("azure-iot-operations/data/thermostat"),
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatParquet),
SchemaRef: to.Ptr("aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0"),
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
Name: to.Ptr("destination1"),
DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
EndpointRef: to.Ptr("fabric-endpoint"),
DataDestination: to.Ptr("telemetryTable"),
},
},
},
},
ExtendedLocation: &armiotoperations.ExtendedLocation{
Name: to.Ptr("/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123"),
Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armiotoperations.DataflowClientCreateOrUpdateResponse{
// DataflowResource: &armiotoperations.DataflowResource{
// Properties: &armiotoperations.DataflowProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// Operations: []*armiotoperations.DataflowOperation{
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeSource),
// Name: to.Ptr("source1"),
// SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
// EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
// DataSources: []*string{
// to.Ptr("azure-iot-operations/data/thermostat"),
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
// BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
// SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatParquet),
// SchemaRef: to.Ptr("aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0"),
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
// Name: to.Ptr("destination1"),
// DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
// EndpointRef: to.Ptr("fabric-endpoint"),
// DataDestination: to.Ptr("telemetryTable"),
// },
// },
// },
// ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
// },
// ExtendedLocation: &armiotoperations.ExtendedLocation{
// Name: to.Ptr("/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123"),
// Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
// },
// ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"),
// Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"),
// Type: to.Ptr("Microsoft.IoTOperations/instances/dataflowProfiles/dataflows"),
// SystemData: &armiotoperations.SystemData{
// CreatedBy: to.Ptr("contosouser"),
// CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// LastModifiedBy: to.Ptr("contosouser"),
// LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IoTOperationsClient } = require("@azure/arm-iotoperations");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create a DataflowResource
*
* @summary create a DataflowResource
* x-ms-original-file: 2026-03-01/Dataflow_CreateOrUpdate_SimpleFabric.json
*/
async function dataflowCreateOrUpdateSimpleFabric() {
const credential = new DefaultAzureCredential();
const subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53";
const client = new IoTOperationsClient(credential, subscriptionId);
const result = await client.dataflow.createOrUpdate(
"rgiotoperations",
"resource-name123",
"resource-name123",
"aio-to-fabric",
{
properties: {
mode: "Enabled",
operations: [
{
operationType: "Source",
name: "source1",
sourceSettings: {
endpointRef: "aio-builtin-broker-endpoint",
dataSources: ["azure-iot-operations/data/thermostat"],
},
},
{
operationType: "BuiltInTransformation",
builtInTransformationSettings: {
serializationFormat: "Parquet",
schemaRef: "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0",
},
},
{
operationType: "Destination",
name: "destination1",
destinationSettings: {
endpointRef: "fabric-endpoint",
dataDestination: "telemetryTable",
},
},
],
},
extendedLocation: {
name: "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
type: "CustomLocation",
},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"azure-iot-operations/data/thermostat"
]
}
},
{
"operationType": "BuiltInTransformation",
"builtInTransformationSettings": {
"serializationFormat": "Parquet",
"schemaRef": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0"
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "fabric-endpoint",
"dataDestination": "telemetryTable"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123",
"name": "jxhcpwgfkxqasbexkookvxk",
"type": "Microsoft.IoTOperations/instances/dataflowProfiles/dataflows",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"mode": "Enabled",
"operations": [
{
"operationType": "Source",
"name": "source1",
"sourceSettings": {
"endpointRef": "aio-builtin-broker-endpoint",
"dataSources": [
"azure-iot-operations/data/thermostat"
]
}
},
{
"operationType": "BuiltInTransformation",
"builtInTransformationSettings": {
"serializationFormat": "Parquet",
"schemaRef": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0"
}
},
{
"operationType": "Destination",
"name": "destination1",
"destinationSettings": {
"endpointRef": "fabric-endpoint",
"dataDestination": "telemetryTable"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123",
"name": "jxhcpwgfkxqasbexkookvxk",
"type": "Microsoft.IoTOperations/instances/dataflowProfiles/dataflows",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Definitions
createdByType
Enumeration
The type of identity that created the resource.
| Value |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
Object
Dataflow BuiltIn Transformation dataset properties
| Name |
Type |
Description |
|
description
|
string
maxLength: 256
|
A user provided optional description of the dataset.
|
|
expression
|
string
|
Condition to enrich data from Broker State Store. Example: $1 < 0 || $1 > $2 (Assuming inputs section $1 and $2 are provided)
|
|
inputs
|
string[]
|
List of fields for enriching from the Broker State Store.
|
|
key
|
string
maxLength: 64
|
The key of the dataset.
|
|
schemaRef
|
string
|
The reference to the schema that describes the dataset. Allowed: JSON Schema/draft-7.
|
Object
Dataflow BuiltIn Transformation filter properties
| Name |
Type |
Default value |
Description |
|
description
|
string
maxLength: 256
|
|
A user provided optional description of the filter.
|
|
expression
|
string
|
|
Condition to filter data. Can reference input fields with {n} where n is the index of the input field starting from 1. Example: $1 < 0 || $1 > $2 (Assuming inputs section $1 and $2 are provided)
|
|
inputs
|
string[]
|
|
List of fields for filtering in JSON path expression.
|
|
type
|
FilterType
|
Filter
|
The type of dataflow operation.
|
Object
Dataflow BuiltIn Transformation map properties
| Name |
Type |
Description |
|
description
|
string
maxLength: 256
|
A user provided optional description of the mapping function.
|
|
expression
|
string
|
Modify the inputs field(s) to the final output field. Example: $1 * 2.2 (Assuming inputs section $1 is provided)
|
|
inputs
|
string[]
|
List of fields for mapping in JSON path expression.
|
|
output
|
string
|
Where and how the input fields to be organized in the output record.
|
|
type
|
DataflowMappingType
|
Type of transformation.
|
Object
Dataflow BuiltIn Transformation properties
Object
Dataflow Destination Add if not present HeaderAction properties
| Name |
Type |
Description |
|
actionType
|
string:
AddIfNotPresent
|
The type of header operation to perform.
|
|
key
|
string
|
The name of the header to add.
|
|
value
|
string
|
The value of the header to add.
|
Object
Dataflow Destination Add or Replace HeaderAction properties
| Name |
Type |
Description |
|
actionType
|
string:
AddOrReplace
|
The type of header operation to perform.
|
|
key
|
string
|
The name of the header to add or replace.
|
|
value
|
string
|
The value of the header to add or replace.
|
DataflowDestinationOperationSettings
Object
Dataflow Destination Operation properties
| Name |
Type |
Description |
|
dataDestination
|
string
minLength: 1
|
Destination location, can be a topic or table name. Supports dynamic values with $topic, $systemProperties, $userProperties, $payload, $context, and $subscription.
|
|
endpointRef
|
string
|
Reference to the Endpoint CR. Can be of Broker, Kafka, Fabric, ADLS, ADX type.
|
|
headers
|
DataflowDestinationHeaderAction[]:
|
Headers for the output data.
|
Object
Dataflow Destination Remove HeaderAction properties
| Name |
Type |
Description |
|
actionType
|
string:
Remove
|
The type of header operation to perform.
|
|
key
|
string
|
The name of the header to remove.
|
Enumeration
Dataflow Destination Header Action Types
| Value |
Description |
|
AddIfNotPresent
|
Add if not present type
|
|
Remove
|
Remove type
|
|
AddOrReplace
|
Add or Replace type
|
DataflowMappingType
Enumeration
Dataflow type mapping properties
| Value |
Description |
|
NewProperties
|
New Properties type
|
|
Rename
|
Rename type
|
|
Compute
|
Compute type
|
|
PassThrough
|
Pass-through type
|
|
BuiltInFunction
|
Built in function type
|
DataflowOperation
Object
Dataflow Operation properties. NOTE - One only method is allowed to be used for one entry.
DataflowProperties
Object
Dataflow Resource properties
| Name |
Type |
Default value |
Description |
|
healthState
|
ResourceHealthState
|
Unknown
|
The health state of the resource.
|
|
mode
|
OperationalMode
|
Enabled
|
Mode for Dataflow. Optional; defaults to Enabled.
|
|
operations
|
DataflowOperation[]
|
|
List of operations including source and destination references as well as transformation.
|
|
provisioningState
|
ProvisioningState
|
|
The status of the last operation.
|
|
requestDiskPersistence
|
OperationalMode
|
|
Disk persistence mode.
|
|
status
|
DataflowStatus
|
|
The status for the dataflow.
|
DataflowResource
Object
Instance dataflowProfile dataflow resource
| Name |
Type |
Description |
|
extendedLocation
|
ExtendedLocation
|
Edge location of the resource.
|
|
id
|
string
(arm-id)
|
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
The name of the resource
|
|
properties
|
DataflowProperties
|
The resource-specific properties for this resource.
|
|
systemData
|
systemData
|
Azure Resource Manager metadata containing createdBy and modifiedBy information.
|
|
type
|
string
|
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
|
DataflowSourceOperationSettings
Object
Dataflow Source Operation properties
| Name |
Type |
Default value |
Description |
|
assetRef
|
string
|
|
Reference to the resource in Azure Device Registry where the data in the endpoint originates from.
|
|
dataSources
|
string[]
minLength: 1
|
|
List of source locations. Can be Broker or Kafka topics. Supports wildcards # and +.
|
|
endpointRef
|
string
|
|
Reference to the Dataflow Endpoint resource. Can only be of Broker and Kafka type.
|
|
schemaRef
|
string
|
|
Schema CR reference. Data will be deserialized according to the schema, and dropped if it doesn't match.
|
|
serializationFormat
|
SourceSerializationFormat
|
Json
|
Content is a JSON Schema. Allowed: JSON Schema/draft-7.
|
DataflowStatus
Object
DataflowStatus status.
ErrorAdditionalInfo
Object
The resource management error additional info.
| Name |
Type |
Description |
|
info
|
object
|
The additional info.
|
|
type
|
string
|
The additional info type.
|
ErrorDetail
Object
The error detail.
| Name |
Type |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
|
code
|
string
|
The error code.
|
|
details
|
ErrorDetail[]
|
The error details.
|
|
message
|
string
|
The error message.
|
|
target
|
string
|
The error target.
|
ErrorResponse
Object
Error response
| Name |
Type |
Description |
|
error
|
ErrorDetail
|
The error object.
|
ExtendedLocation
Object
Extended location is an extension of Azure locations. They provide a way to use their Azure ARC enabled Kubernetes clusters as target locations for deploying Azure services instances.
| Name |
Type |
Description |
|
name
|
string
|
The name of the extended location.
|
|
type
|
ExtendedLocationType
|
Type of ExtendedLocation.
|
ExtendedLocationType
Enumeration
The enum defining type of ExtendedLocation accepted.
| Value |
Description |
|
CustomLocation
|
CustomLocation type
|
FilterType
Enumeration
Filter Type properties
| Value |
Description |
|
Filter
|
Filter type
|
OperationalMode
Enumeration
Mode properties
| Value |
Description |
|
Enabled
|
Enabled is equivalent to True
|
|
Disabled
|
Disabled is equivalent to False.
|
OperationType
Enumeration
Dataflow Operation Type properties
| Value |
Description |
|
Source
|
Dataflow Source Operation
|
|
Destination
|
Dataflow Destination Operation
|
|
BuiltInTransformation
|
Dataflow BuiltIn Transformation Operation
|
ProvisioningState
Enumeration
The enum defining status of resource.
| Value |
Description |
|
Succeeded
|
Resource has been created.
|
|
Failed
|
Resource creation failed.
|
|
Canceled
|
Resource creation was canceled.
|
|
Provisioning
|
Resource is getting provisioned.
|
|
Updating
|
Resource is Updating.
|
|
Deleting
|
Resource is Deleting.
|
|
Accepted
|
Resource has been Accepted.
|
ResourceHealthState
Enumeration
The health state of the resource.
| Value |
Description |
|
Available
|
Resource is Available and functioning as expected.
|
|
Degraded
|
Resource health is degraded.
|
|
Unavailable
|
Resource is not functioning as expected.
|
|
Unknown
|
Resource state is unknown.
|
ResourceHealthStatus
Object
Represents the health state of a resource.
| Name |
Type |
Description |
|
lastTransitionTime
|
string
|
The timestamp (RFC3339) when the health status last changed.
|
|
lastUpdateTime
|
string
|
The timestamp (RFC3339) when the health status was last updated, even if the status did not change.
|
|
message
|
string
|
A human-readable message describing the last transition.
|
|
reasonCode
|
string
|
Unique, CamelCase reason code describing the cause of the last health state transition.
|
|
status
|
ResourceHealthState
|
The high-level health status of the resource.
|
Enumeration
Serialization Format properties
| Value |
Description |
|
Json
|
JSON Format
|
systemData
Object
Metadata pertaining to creation and last modification of the resource.
| Name |
Type |
Description |
|
createdAt
|
string
(date-time)
|
The timestamp of resource creation (UTC).
|
|
createdBy
|
string
|
The identity that created the resource.
|
|
createdByType
|
createdByType
|
The type of identity that created the resource.
|
|
lastModifiedAt
|
string
(date-time)
|
The timestamp of resource last modification (UTC)
|
|
lastModifiedBy
|
string
|
The identity that last modified the resource.
|
|
lastModifiedByType
|
createdByType
|
The type of identity that last modified the resource.
|
Enumeration
Transformation Format properties
| Value |
Description |
|
Delta
|
Delta Format
|
|
Json
|
JSON Format
|
|
Parquet
|
Parquet Format
|