Erstellen einer 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-Parameter
| Name |
In |
Erforderlich |
Typ |
Beschreibung |
|
dataflowName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Name der Instanz dataflowProfile-Datenflowressource
|
|
dataflowProfileName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Name der Instanz dataflowProfile-Ressource
|
|
instanceName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Name der Instanz.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Der Name der Ressourcengruppe. Bei dem Namen wird die Groß-/Kleinschreibung nicht beachtet.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
Die ID des Zielabonnements. Der Wert muss eine UUID sein.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Die API-Version, die für diesen Vorgang verwendet werden soll.
|
Anforderungstext
| Name |
Typ |
Beschreibung |
|
extendedLocation
|
ExtendedLocation
|
Edgespeicherort der Ressource.
|
|
properties
|
DataflowProperties
|
Die ressourcenspezifischen Eigenschaften für diese Ressource.
|
Antworten
| Name |
Typ |
Beschreibung |
|
200 OK
|
DataflowResource
|
Der Aktualisierungsvorgang "DataflowResource" der Ressource war erfolgreich
|
|
201 Created
|
DataflowResource
|
Der Erstellungsvorgang der Ressource 'DataflowResource' war erfolgreich
Header
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
Unerwartete Fehlerantwort.
|
Sicherheit
azure_auth
Azure Active Directory-OAuth2-Flow.
Typ:
oauth2
Ablauf:
implicit
Autorisierungs-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiche
| Name |
Beschreibung |
|
user_impersonation
|
Identitätswechsel ihres Benutzerkontos
|
Beispiele
Dataflow_CreateOrUpdate
Beispielanforderung
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
Beispiel für eine Antwort
{
"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
Beispielanforderung
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
Beispiel für eine Antwort
{
"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
Beispielanforderung
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
Beispiel für eine Antwort
{
"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
Beispielanforderung
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
Beispiel für eine Antwort
{
"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
Beispielanforderung
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
Beispiel für eine Antwort
{
"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
Beispielanforderung
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
Beispiel für eine Antwort
{
"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"
}
}
Definitionen
createdByType
Enumeration
Der Identitätstyp, der die Ressource erstellt hat.
| Wert |
Beschreibung |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
Objekt
Eigenschaften des Dataflow BuiltIn-Transformationsdatasets
| Name |
Typ |
Beschreibung |
|
description
|
string
maxLength: 256
|
Ein Benutzer hat eine optionale Beschreibung des Datasets bereitgestellt.
|
|
expression
|
string
|
Bedingung zum Anreichern von Daten aus dem Broker State Store. Beispiel: $1 < 0 || $1 > $2 (Vorausgesetzt, der Eingabeabschnitt $1 und $2 wird bereitgestellt)
|
|
inputs
|
string[]
|
Liste der Felder zum Anreichern aus dem Broker State Store.
|
|
key
|
string
maxLength: 64
|
Der Schlüssel des Datasets.
|
|
schemaRef
|
string
|
Der Verweis auf das Schema, das das Dataset beschreibt. Zulässig: JSON-Schema/Draft-7.
|
Objekt
Eigenschaften des Filters "Dataflow BuiltIn-Transformation"
| Name |
Typ |
Standardwert |
Beschreibung |
|
description
|
string
maxLength: 256
|
|
Ein Benutzer hat eine optionale Beschreibung des Filters bereitgestellt.
|
|
expression
|
string
|
|
Bedingung zum Filtern von Daten. Kann auf Eingabefelder mit {n} verweisen, wobei n der Index des Eingabefelds ab 1 ist. Beispiel: $1 < 0 || $1 > $2 (Vorausgesetzt, der Eingabeabschnitt $1 und $2 wird bereitgestellt)
|
|
inputs
|
string[]
|
|
Liste der Felder zum Filtern im JSON-Pfadausdruck.
|
|
type
|
FilterType
|
Filter
|
Der Typ des Datenflussvorgangs.
|
Objekt
Eigenschaften der Dataflow BuiltIn-Transformationskarte
| Name |
Typ |
Beschreibung |
|
description
|
string
maxLength: 256
|
Ein Benutzer hat eine optionale Beschreibung der Zuordnungsfunktion bereitgestellt.
|
|
expression
|
string
|
Ändern Sie die Eingabefelder in das endgültige Ausgabefeld. Beispiel: $1 * 2,2 (Vorausgesetzt, der Eingabeabschnitt $1 wird bereitgestellt)
|
|
inputs
|
string[]
|
Liste der Felder für die Zuordnung im JSON-Pfadausdruck.
|
|
output
|
string
|
Wo und wie die Eingabefelder im Ausgabedatensatz angeordnet werden sollen.
|
|
type
|
DataflowMappingType
|
Typ der Transformation.
|
Objekt
Eigenschaften der integrierten Dataflow-Transformation
Objekt
Dataflow-Ziel Hinzufügen, wenn keine HeaderAction-Eigenschaften vorhanden sind
| Name |
Typ |
Beschreibung |
|
actionType
|
string:
AddIfNotPresent
|
Der Typ des auszuführenden Headervorgangs.
|
|
key
|
string
|
Der Name des Headers, der hinzugefügt werden soll.
|
|
value
|
string
|
Der Wert des hinzuzufügenden Headers.
|
Objekt
Dataflow-Ziel Hinzufügen oder Ersetzen von HeaderAction-Eigenschaften
| Name |
Typ |
Beschreibung |
|
actionType
|
string:
AddOrReplace
|
Der Typ des auszuführenden Headervorgangs.
|
|
key
|
string
|
Der Name des Headers, der hinzugefügt oder ersetzt werden soll.
|
|
value
|
string
|
Der Wert des Headers, der hinzugefügt oder ersetzt werden soll.
|
DataflowDestinationOperationSettings
Objekt
Eigenschaften des Dataflow-Zielvorgangs
| Name |
Typ |
Beschreibung |
|
dataDestination
|
string
minLength: 1
|
Zielspeicherort kann ein Thema oder ein Tabellenname sein. Unterstützt dynamische Werte mit $topic, $systemProperties, $userProperties, $payload, $context und $subscription.
|
|
endpointRef
|
string
|
Verweis auf Endpunkt CR. Dies kann der Typ Broker, Kafka, Fabric, ADLS, ADX sein.
|
|
headers
|
DataflowDestinationHeaderAction[]:
|
Header für die Ausgabedaten.
|
Objekt
Eigenschaften von Dataflow Destination Remove HeaderAction
| Name |
Typ |
Beschreibung |
|
actionType
|
string:
Remove
|
Der Typ des auszuführenden Headervorgangs.
|
|
key
|
string
|
Der Name des Headers, der entfernt werden soll.
|
Enumeration
Aktionstypen für Datenflusszielheader
| Wert |
Beschreibung |
|
AddIfNotPresent
|
Hinzufügen, falls nicht vorhandener Typ
|
|
Remove
|
Typ entfernen
|
|
AddOrReplace
|
Typ hinzufügen oder ersetzen
|
DataflowMappingType
Enumeration
Eigenschaften der Datenflusstyp-Zuordnung
| Wert |
Beschreibung |
|
NewProperties
|
Neuer Typ "Eigenschaften"
|
|
Rename
|
Typ umbenennen
|
|
Compute
|
Computetyp
|
|
PassThrough
|
Durchlauf-Typ
|
|
BuiltInFunction
|
Eingebauter Funktionstyp
|
DataflowOperation
Objekt
Eigenschaften des Dataflow-Vorgangs. HINWEIS - Für einen Eintrag darf nur eine Methode verwendet werden.
DataflowProperties
Objekt
Eigenschaften von Dataflow-Ressourcen
| Name |
Typ |
Standardwert |
Beschreibung |
|
healthState
|
ResourceHealthState
|
Unknown
|
Der Integritätsstatus der Ressource.
|
|
mode
|
OperationalMode
|
Enabled
|
Modus für Dataflow. Wahlfrei; standardmäßig auf "Aktiviert" festgelegt.
|
|
operations
|
DataflowOperation[]
|
|
Liste der Vorgänge, einschließlich Quell- und Zielverweise sowie Transformation.
|
|
provisioningState
|
ProvisioningState
|
|
Der Status des letzten Vorgangs.
|
|
requestDiskPersistence
|
OperationalMode
|
|
Festplattenpersistenzmodus.
|
|
status
|
DataflowStatus
|
|
Der Status für den Datenfluss.
|
DataflowResource
Objekt
Instanz-DataflowProfile-Dataflow-Ressource
| Name |
Typ |
Beschreibung |
|
extendedLocation
|
ExtendedLocation
|
Edgespeicherort der Ressource.
|
|
id
|
string
(arm-id)
|
Vollqualifizierte Ressourcen-ID für die Ressource. Z. B. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
Der Name der Ressource
|
|
properties
|
DataflowProperties
|
Die ressourcenspezifischen Eigenschaften für diese Ressource.
|
|
systemData
|
systemData
|
Azure Resource Manager-Metadaten, die createdBy- und modifiedBy-Informationen enthalten.
|
|
type
|
string
|
Der Typ der Ressource. Z. B. "Microsoft.Compute/virtualMachines" oder "Microsoft.Storage/storageAccounts"
|
DataflowSourceOperationSettings
Objekt
Eigenschaften des Dataflow-Quellvorgangs
| Name |
Typ |
Standardwert |
Beschreibung |
|
assetRef
|
string
|
|
Verweisen Sie auf die Ressource in der Azure-Geräteregistrierung, von der die Daten im Endpunkt stammen.
|
|
dataSources
|
string[]
minLength: 1
|
|
Liste der Quellspeicherorte. Kann Broker- oder Kafka-Themen sein. Unterstützt Platzhalter # und +.
|
|
endpointRef
|
string
|
|
Verweisen auf die Dataflow-Endpunktressource. Kann nur vom Typ Broker und Kafka sein.
|
|
schemaRef
|
string
|
|
Schema CR-Referenz. Die Daten werden gemäß dem Schema deserialisiert und gelöscht, wenn sie nicht übereinstimmen.
|
|
serializationFormat
|
SourceSerializationFormat
|
Json
|
Inhalt ist ein JSON-Schema. Zulässig: JSON-Schema/Draft-7.
|
DataflowStatus
Objekt
DataflowStatusstatus.
ErrorAdditionalInfo
Objekt
Der Ressourcenverwaltungsfehler zusätzliche Informationen.
| Name |
Typ |
Beschreibung |
|
info
|
object
|
Die zusätzlichen Informationen.
|
|
type
|
string
|
Der zusätzliche Informationstyp.
|
ErrorDetail
Objekt
Das Fehlerdetails.
| Name |
Typ |
Beschreibung |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Die zusätzlichen Informationen des Fehlers.
|
|
code
|
string
|
Der Fehlercode.
|
|
details
|
ErrorDetail[]
|
Die Fehlerdetails.
|
|
message
|
string
|
Die Fehlermeldung.
|
|
target
|
string
|
Das Fehlerziel.
|
ErrorResponse
Objekt
Fehlerantwort
| Name |
Typ |
Beschreibung |
|
error
|
ErrorDetail
|
Das Fehlerobjekt.
|
ExtendedLocation
Objekt
Der erweiterte Standort ist eine Erweiterung von Azure-Standorten. Sie bieten eine Möglichkeit, ihre Azure ARC-fähigen Kubernetes-Cluster als Zielspeicherorte für die Bereitstellung von Azure-Dienstinstanzen zu verwenden.
| Name |
Typ |
Beschreibung |
|
name
|
string
|
Der Name des erweiterten Speicherorts.
|
|
type
|
ExtendedLocationType
|
Typ von ExtendedLocation.
|
ExtendedLocationType
Enumeration
Der Enumerationsdefinitionstyp von ExtendedLocation wird akzeptiert.
| Wert |
Beschreibung |
|
CustomLocation
|
CustomLocation-Typ
|
FilterType
Enumeration
Eigenschaften des Filtertyps
| Wert |
Beschreibung |
|
Filter
|
Filtertyp
|
OperationalMode
Enumeration
Eigenschaften des Modus
| Wert |
Beschreibung |
|
Enabled
|
Aktiviert entspricht True
|
|
Disabled
|
Deaktiviert entspricht False.
|
OperationType
Enumeration
Eigenschaften des Dataflow-Vorgangstyps
| Wert |
Beschreibung |
|
Source
|
Vorgang der Datenflussquelle
|
|
Destination
|
Vorgang des Dataflow-Ziels
|
|
BuiltInTransformation
|
Integrierter Dataflow-Transformationsvorgang
|
ProvisioningState
Enumeration
Die Enumeration, die den Status der Ressource definiert.
| Wert |
Beschreibung |
|
Succeeded
|
Ressource wurde erstellt.
|
|
Failed
|
Fehler bei der Ressourcenerstellung.
|
|
Canceled
|
Die Ressourcenerstellung wurde abgebrochen.
|
|
Provisioning
|
Die Ressource wird bereitgestellt.
|
|
Updating
|
Ressource wird aktualisiert.
|
|
Deleting
|
Ressource wird gelöscht.
|
|
Accepted
|
Die Ressource wurde akzeptiert.
|
ResourceHealthState
Enumeration
Der Integritätsstatus der Ressource.
| Wert |
Beschreibung |
|
Available
|
Die Ressource ist verfügbar und funktioniert wie erwartet.
|
|
Degraded
|
Die Ressourcenintegrität wird herabgestuft.
|
|
Unavailable
|
Die Ressource funktioniert nicht wie erwartet.
|
|
Unknown
|
Der Ressourcenstatus ist unbekannt.
|
ResourceHealthStatus
Objekt
Repräsentiert den Gesundheitszustand einer Ressource.
| Name |
Typ |
Beschreibung |
|
lastTransitionTime
|
string
|
Der Zeitstempel (RFC3339), wann sich der Gesundheitszustand zuletzt geändert hat.
|
|
lastUpdateTime
|
string
|
Der Zeitstempel (RFC3339), als der Gesundheitsstatus zuletzt aktualisiert wurde, selbst wenn sich der Status nicht geändert hat.
|
|
message
|
string
|
Eine für Menschen lesbare Nachricht, die den letzten Übergang beschreibt.
|
|
reasonCode
|
string
|
Einzigartiger CamelCase-Reason-Code, der die Ursache des letzten Gesundheitszustandsübergangs beschreibt.
|
|
status
|
ResourceHealthState
|
Der Gesundheitszustand der Ressource auf hohem Niveau.
|
Enumeration
Eigenschaften des Serialisierungsformats
| Wert |
Beschreibung |
|
Json
|
JSON-Format
|
systemData
Objekt
Metadaten zur Erstellung und letzten Änderung der Ressource.
| Name |
Typ |
Beschreibung |
|
createdAt
|
string
(date-time)
|
Der Zeitstempel der Ressourcenerstellung (UTC).
|
|
createdBy
|
string
|
Die Identität, die die Ressource erstellt hat.
|
|
createdByType
|
createdByType
|
Der Identitätstyp, der die Ressource erstellt hat.
|
|
lastModifiedAt
|
string
(date-time)
|
Der Zeitstempel der letzten Änderung der Ressource (UTC)
|
|
lastModifiedBy
|
string
|
Die Identität, die die Ressource zuletzt geändert hat.
|
|
lastModifiedByType
|
createdByType
|
Der Identitätstyp, der die Ressource zuletzt geändert hat.
|
Enumeration
Eigenschaften des Transformationsformats
| Wert |
Beschreibung |
|
Delta
|
Delta-Format
|
|
Json
|
JSON-Format
|
|
Parquet
|
Parkett-Format
|