Skapa en 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-parametrar
| Name |
I |
Obligatorisk |
Typ |
Description |
|
dataflowName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Namn på instansdataflödeProfildataflödesresurs
|
|
dataflowProfileName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Namn på instansdataflödeProfilresurs
|
|
instanceName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Namnet på instansen.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Namnet på resursgruppen. Namnet är skiftlägesokänsligt.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
ID för målprenumerationen. Värdet måste vara ett UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Den API-version som ska användas för den här åtgärden.
|
Begärandetext
Svar
| Name |
Typ |
Description |
|
200 OK
|
DataflowResource
|
Uppdateringsåtgärden "DataflowResource" för resursen har slutförts
|
|
201 Created
|
DataflowResource
|
Resursen "DataflowResource" för att skapa åtgärden lyckades
Sidhuvuden
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
Ett oväntat felsvar.
|
Säkerhet
azure_auth
Azure Active Directory OAuth2-flöde.
Typ:
oauth2
Flow:
implicit
Auktoriseringswebbadress:
https://login.microsoftonline.com/common/oauth2/authorize
Omfattningar
| Name |
Description |
|
user_impersonation
|
personifiera ditt användarkonto
|
Exempel
Dataflow_CreateOrUpdate
Exempelbegäran
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
Exempelsvar
{
"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
Exempelbegäran
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
Exempelsvar
{
"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
Exempelbegäran
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
Exempelsvar
{
"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
Exempelbegäran
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
Exempelsvar
{
"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
Exempelbegäran
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
Exempelsvar
{
"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
Exempelbegäran
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
Exempelsvar
{
"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"
}
}
Definitioner
createdByType
Uppräkning
Den typ av identitet som skapade resursen.
| Värde |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
Objekt
Egenskaper för datauppsättning för inbyggd transformering för dataflöde
| Name |
Typ |
Description |
|
description
|
string
maxLength: 256
|
En användare har angett en valfri beskrivning av datamängden.
|
|
expression
|
string
|
Villkor för att utöka data från Broker State Store. Exempel: $1 < 0 || $1 > $2 (förutsatt att indata avsnitt $1 och $2 tillhandahålls)
|
|
inputs
|
string[]
|
Lista över fält för berikande från Broker State Store.
|
|
key
|
string
maxLength: 64
|
Nyckeln för datauppsättningen.
|
|
schemaRef
|
string
|
Referensen till schemat som beskriver datauppsättningen. Tillåten: JSON-schema/utkast-7.
|
Objekt
Filteregenskaper för inbyggd transformering för dataflöde
| Name |
Typ |
Standardvärde |
Description |
|
description
|
string
maxLength: 256
|
|
En användare har angett en valfri beskrivning av filtret.
|
|
expression
|
string
|
|
Villkor för att filtrera data. Kan referera till indatafält med {n} där n är indexet för indatafältet från och med 1. Exempel: $1 < 0 || $1 > $2 (förutsatt att indata avsnitt $1 och $2 tillhandahålls)
|
|
inputs
|
string[]
|
|
Lista över fält för filtrering i JSON-sökvägsuttryck.
|
|
type
|
FilterType
|
Filter
|
Typen av dataflödesåtgärd.
|
Objekt
Egenskaper för inbyggd transformeringskarta för dataflöde
| Name |
Typ |
Description |
|
description
|
string
maxLength: 256
|
En användare har angett en valfri beskrivning av mappningsfunktionen.
|
|
expression
|
string
|
Ändra indatafälten till det slutliga utdatafältet. Exempel: $1 * 2.2 (Förutsatt att indata avsnitt $1 tillhandahålls)
|
|
inputs
|
string[]
|
Lista över fält för mappning i JSON-sökvägsuttryck.
|
|
output
|
string
|
Var och hur indatafälten ska ordnas i utdataposten.
|
|
type
|
DataflowMappingType
|
Typ av transformering.
|
Objekt
Egenskaper för inbyggd transformering av dataflöde
Objekt
Dataflödesmål Lägg till om det inte finns HeaderAction-egenskaper
| Name |
Typ |
Description |
|
actionType
|
string:
AddIfNotPresent
|
Den typ av rubrikåtgärd som ska utföras.
|
|
key
|
string
|
Namnet på rubriken som ska läggas till.
|
|
value
|
string
|
Värdet för rubriken som ska läggas till.
|
Objekt
Egenskaper för dataflödesmål Lägg till eller ersätt HeaderAction
| Name |
Typ |
Description |
|
actionType
|
string:
AddOrReplace
|
Den typ av rubrikåtgärd som ska utföras.
|
|
key
|
string
|
Namnet på rubriken som ska läggas till eller ersättas.
|
|
value
|
string
|
Värdet för rubriken som ska läggas till eller ersättas.
|
DataflowDestinationOperationSettings
Objekt
Egenskaper för målåtgärd för dataflöde
| Name |
Typ |
Description |
|
dataDestination
|
string
minLength: 1
|
Målplats, kan vara ett ämne eller tabellnamn. Stöder dynamiska värden med $topic, $systemProperties, $userProperties, $payload, $context och $subscription.
|
|
endpointRef
|
string
|
Referens till slutpunkts-CR. Kan vara av Broker, Kafka, Fabric, ADLS, ADX-typ.
|
|
headers
|
DataflowDestinationHeaderAction[]:
|
Rubriker för utdata.
|
Objekt
Egenskaper för att ta bort HeaderAction för dataflödesmål
| Name |
Typ |
Description |
|
actionType
|
string:
Remove
|
Den typ av rubrikåtgärd som ska utföras.
|
|
key
|
string
|
Namnet på rubriken som ska tas bort.
|
Uppräkning
Åtgärdstyper för målrubrik för dataflöde
| Värde |
Description |
|
AddIfNotPresent
|
Lägg till om det inte finns typ
|
|
Remove
|
Ta bort text
|
|
AddOrReplace
|
Lägg till eller ersätt typ
|
DataflowMappingType
Uppräkning
Egenskaper för mappning av dataflödestyp
| Värde |
Description |
|
NewProperties
|
Ny egenskapstyp
|
|
Rename
|
Byt namn på typ
|
|
Compute
|
Typ av beräkning
|
|
PassThrough
|
Typ av genomströmning
|
|
BuiltInFunction
|
Inbyggd funktionstyp
|
DataflowOperation
Objekt
Egenskaper för dataflödesåtgärd. OBS - Endast en metod får användas för en post.
DataflowProperties
Objekt
Egenskaper för dataflödesresurs
DataflowResource
Objekt
InstansdataflowProfile-dataflödesresurs
| Name |
Typ |
Description |
|
extendedLocation
|
ExtendedLocation
|
Resursens gränsplats.
|
|
id
|
string
(arm-id)
|
Fullständigt kvalificerat resurs-ID för resursen. Till exempel "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
Namnet på resursen
|
|
properties
|
DataflowProperties
|
Resursspecifika egenskaper för den här resursen.
|
|
systemData
|
systemData
|
Azure Resource Manager-metadata som innehåller createdBy och modifiedBy information.
|
|
type
|
string
|
Resurstypen. Till exempel "Microsoft.Compute/virtualMachines" eller "Microsoft.Storage/storageAccounts"
|
DataflowSourceOperationSettings
Objekt
Egenskaper för åtgärd för dataflödeskälla
| Name |
Typ |
Standardvärde |
Description |
|
assetRef
|
string
|
|
Referens till resursen i Azure Device Registry där data i slutpunkten kommer från.
|
|
dataSources
|
string[]
minLength: 1
|
|
Lista över källplatser. Kan vara Broker eller Kafka ämnen. Stöder jokertecken # och +.
|
|
endpointRef
|
string
|
|
Referens till dataflödesslutpunktsresursen. Kan bara vara av typen Broker och Kafka.
|
|
schemaRef
|
string
|
|
Referens för schema-CR. Data kommer att deserialiseras enligt schemat och tas bort om de inte matchar.
|
|
serializationFormat
|
SourceSerializationFormat
|
Json
|
Innehåll är ett JSON-schema. Tillåten: JSON-schema/utkast-7.
|
DataflowStatus
Objekt
Dataflödestatus.
ErrorAdditionalInfo
Objekt
Ytterligare information om resurshanteringsfelet.
| Name |
Typ |
Description |
|
info
|
object
|
Den ytterligare informationen.
|
|
type
|
string
|
Typen av ytterligare information.
|
ErrorDetail
Objekt
Felinformationen.
| Name |
Typ |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Felet ytterligare information.
|
|
code
|
string
|
Felkoden.
|
|
details
|
ErrorDetail[]
|
Felinformationen.
|
|
message
|
string
|
Felmeddelandet.
|
|
target
|
string
|
Felet riktas.
|
ErrorResponse
Objekt
Felsvar
ExtendedLocation
Objekt
Utökad plats är en utökning av Azure-platser. De är ett sätt att använda sina Azure ARC-aktiverade Kubernetes-kluster som målplatser för att distribuera instanser av Azure-tjänster.
| Name |
Typ |
Description |
|
name
|
string
|
Namnet på den utökade platsen.
|
|
type
|
ExtendedLocationType
|
Typ av ExtendedLocation.
|
ExtendedLocationType
Uppräkning
Uppräkningen som definierar typen av ExtendedLocation accepterad.
| Värde |
Description |
|
CustomLocation
|
CustomLocation-typ
|
FilterType
Uppräkning
Egenskaper för filtertyp
| Värde |
Description |
|
Filter
|
Filtertyp
|
OperationalMode
Uppräkning
Egenskaper för läge
| Värde |
Description |
|
Enabled
|
Aktiverad motsvarar Sant
|
|
Disabled
|
Inaktiverad motsvarar Falskt.
|
OperationType
Uppräkning
Egenskaper för typ av dataflödesåtgärd
| Värde |
Description |
|
Source
|
Åtgärd för dataflödeskälla
|
|
Destination
|
Målåtgärd för dataflöde
|
|
BuiltInTransformation
|
Inbyggd transformeringsåtgärd för dataflöde
|
ProvisioningState
Uppräkning
Uppräkningen som definierar status för resursen.
| Värde |
Description |
|
Succeeded
|
Resursen har skapats.
|
|
Failed
|
Det gick inte att skapa resurser.
|
|
Canceled
|
Resursskapandet avbröts.
|
|
Provisioning
|
Resursen etableras.
|
|
Updating
|
Resursen uppdateras.
|
|
Deleting
|
Resursen tas bort.
|
|
Accepted
|
Resursen har godkänts.
|
ResourceHealthState
Uppräkning
Resursens hälsotillstånd.
| Värde |
Description |
|
Available
|
Resursen är tillgänglig och fungerar som förväntat.
|
|
Degraded
|
Resurshälsan försämras.
|
|
Unavailable
|
Resursen fungerar inte som förväntat.
|
|
Unknown
|
Resurstillståndet är okänt.
|
ResourceHealthStatus
Objekt
Representerar hälsotillståndet för en resurs.
| Name |
Typ |
Description |
|
lastTransitionTime
|
string
|
Tidsstämpeln (RFC3339) när hälsostatusen senast ändrades.
|
|
lastUpdateTime
|
string
|
Tidsstämpeln (RFC3339) när hälsostatusen senast uppdaterades, även om statusen inte ändrades.
|
|
message
|
string
|
Ett mänskligt läsbart meddelande som beskriver den senaste övergången.
|
|
reasonCode
|
string
|
Unik CamelCase resonationskod som beskriver orsaken till den senaste hälsotillståndsövergången.
|
|
status
|
ResourceHealthState
|
Resursens höga hälsostatus.
|
Uppräkning
Egenskaper för serialiseringsformat
| Värde |
Description |
|
Json
|
JSON-format
|
systemData
Objekt
Metadata som rör skapande och senaste ändring av resursen.
| Name |
Typ |
Description |
|
createdAt
|
string
(date-time)
|
Tidsstämpeln för resursskapande (UTC).
|
|
createdBy
|
string
|
Identiteten som skapade resursen.
|
|
createdByType
|
createdByType
|
Den typ av identitet som skapade resursen.
|
|
lastModifiedAt
|
string
(date-time)
|
Tidsstämpeln för senaste ändring av resurs (UTC)
|
|
lastModifiedBy
|
string
|
Identiteten som senast ändrade resursen.
|
|
lastModifiedByType
|
createdByType
|
Den typ av identitet som senast ändrade resursen.
|
Uppräkning
Egenskaper för omvandlingsformat
| Värde |
Description |
|
Delta
|
Delta-format
|
|
Json
|
JSON-format
|
|
Parquet
|
Parkettformat
|