Criar um DataflowResource
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}?api-version=2026-03-01
Parâmetros do URI
| Name |
Em |
Necessário |
Tipo |
Description |
|
dataflowName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Nome do recurso de fluxo de dados Instance dataflowProfile
|
|
dataflowProfileName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Nome do recurso dataflowProfile da instância
|
|
instanceName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Nome da instância.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
O nome do grupo de recursos. O nome não diferencia maiúsculas de minúsculas.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
A ID da assinatura de destino. O valor deve ser um UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
A versão da API a utilizar para esta operação.
|
Corpo do Pedido
| Name |
Tipo |
Description |
|
extendedLocation
|
ExtendedLocation
|
Localização de borda do recurso.
|
|
properties
|
DataflowProperties
|
As propriedades específicas do recurso para este recurso.
|
Respostas
| Name |
Tipo |
Description |
|
200 OK
|
DataflowResource
|
Operação de atualização do recurso 'DataflowResource' bem-sucedida
|
|
201 Created
|
DataflowResource
|
Recurso 'DataflowResource' criar operação bem-sucedida
Cabeçalhos
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
Uma resposta de erro inesperada.
|
Segurança
azure_auth
Fluxo OAuth2 do Azure Ative Directory.
Tipo:
oauth2
Fluxo:
implicit
URL de Autorização:
https://login.microsoftonline.com/common/oauth2/authorize
Âmbitos
| Name |
Description |
|
user_impersonation
|
personificar a sua conta de utilizador
|
Exemplos
Dataflow_CreateOrUpdate
Pedido de amostra
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
Resposta da amostra
{
"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
Pedido de amostra
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
Resposta da amostra
{
"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
Pedido de amostra
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
Resposta da amostra
{
"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
Pedido de amostra
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
Resposta da amostra
{
"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
Pedido de amostra
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
Resposta da amostra
{
"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
Pedido de amostra
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
Resposta da amostra
{
"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"
}
}
Definições
createdByType
Enumeração
O tipo de identidade que criou o recurso.
| Valor |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
Object
Propriedades do conjunto de dados de transformação interna de fluxo de dados de fluxo de dados
| Name |
Tipo |
Description |
|
description
|
string
maxLength: 256
|
Um usuário forneceu uma descrição opcional do conjunto de dados.
|
|
expression
|
string
|
Condição para enriquecer dados do Broker State Store. Exemplo: $1 < 0 || $1 > $2 (Supondo que a seção de entradas $1 e $2 são fornecidas)
|
|
inputs
|
string[]
|
Lista de campos para enriquecimento a partir do Broker State Store.
|
|
key
|
string
maxLength: 64
|
A chave do conjunto de dados.
|
|
schemaRef
|
string
|
A referência ao esquema que descreve o conjunto de dados. Permitido: JSON Schema/draft-7.
|
Object
Propriedades do filtro Dataflow BuiltIn Transformation
| Name |
Tipo |
Default value |
Description |
|
description
|
string
maxLength: 256
|
|
Um usuário forneceu uma descrição opcional do filtro.
|
|
expression
|
string
|
|
Condição para filtrar dados. Pode fazer referência a campos de entrada com {n} onde n é o índice do campo de entrada a partir de 1. Exemplo: $1 < 0 || $1 > $2 (Supondo que a seção de entradas $1 e $2 são fornecidas)
|
|
inputs
|
string[]
|
|
Lista de campos para filtragem na expressão de caminho JSON.
|
|
type
|
FilterType
|
Filter
|
O tipo de operação de fluxo de dados.
|
Object
Propriedades do mapa de transformação integrada de fluxo de dados
| Name |
Tipo |
Description |
|
description
|
string
maxLength: 256
|
Um usuário forneceu uma descrição opcional da função de mapeamento.
|
|
expression
|
string
|
Modifique o(s) campo(s) de entrada para o campo de saída final. Exemplo: $1 * 2.2 (Supondo que a seção de entradas $1 é fornecida)
|
|
inputs
|
string[]
|
Lista de campos para mapeamento na expressão de caminho JSON.
|
|
output
|
string
|
Onde e como os campos de entrada a serem organizados no registro de saída.
|
|
type
|
DataflowMappingType
|
Tipo de transformação.
|
Object
Propriedades de transformação interna de fluxo de dados
Object
Destino do fluxo de dados Adicionar se não apresentar propriedades HeaderAction
| Name |
Tipo |
Description |
|
actionType
|
string:
AddIfNotPresent
|
O tipo de operação de cabeçalho a ser executada.
|
|
key
|
string
|
O nome do cabeçalho a ser adicionado.
|
|
value
|
string
|
O valor do cabeçalho a ser adicionado.
|
Object
Destino do fluxo de dados Adicionar ou substituir propriedades HeaderAction
| Name |
Tipo |
Description |
|
actionType
|
string:
AddOrReplace
|
O tipo de operação de cabeçalho a ser executada.
|
|
key
|
string
|
O nome do cabeçalho a ser adicionado ou substituído.
|
|
value
|
string
|
O valor do cabeçalho a ser adicionado ou substituído.
|
DataflowDestinationOperationSettings
Object
Propriedades da operação de destino do fluxo de dados
| Name |
Tipo |
Description |
|
dataDestination
|
string
minLength: 1
|
Local de destino, pode ser um tópico ou nome de tabela. Suporta valores dinâmicos com $topic, $systemProperties, $userProperties, $payload, $context e $subscription.
|
|
endpointRef
|
string
|
Referência à CR do ponto final. Pode ser do tipo Broker, Kafka, Fabric, ADLS, ADX.
|
|
headers
|
DataflowDestinationHeaderAction[]:
|
Cabeçalhos para os dados de saída.
|
Object
Destino do fluxo de dados Remover propriedades HeaderAction
| Name |
Tipo |
Description |
|
actionType
|
string:
Remove
|
O tipo de operação de cabeçalho a ser executada.
|
|
key
|
string
|
O nome do cabeçalho a ser removido.
|
Enumeração
Tipos de ação de cabeçalho de destino de fluxo de dados
| Valor |
Description |
|
AddIfNotPresent
|
Adicionar se não estiver presente tipo
|
|
Remove
|
Remover tipo
|
|
AddOrReplace
|
Adicionar ou substituir tipo
|
DataflowMappingType
Enumeração
Propriedades de mapeamento de tipo de fluxo de dados
| Valor |
Description |
|
NewProperties
|
Novo tipo de propriedades
|
|
Rename
|
Renomear tipo
|
|
Compute
|
Tipo de computação
|
|
PassThrough
|
Tipo de passagem
|
|
BuiltInFunction
|
Tipo de função incorporado
|
DataflowOperation
Object
Propriedades da operação de fluxo de dados. NOTA - É permitido utilizar um único método para uma entrada.
DataflowProperties
Object
Propriedades do recurso de fluxo de dados
| Name |
Tipo |
Default value |
Description |
|
healthState
|
ResourceHealthState
|
Unknown
|
O estado de saúde do recurso.
|
|
mode
|
OperationalMode
|
Enabled
|
Modo para fluxo de dados. Opcional; o padrão é Habilitado.
|
|
operations
|
DataflowOperation[]
|
|
Lista de operações, incluindo referências de origem e destino, bem como transformação.
|
|
provisioningState
|
ProvisioningState
|
|
O status da última operação.
|
|
requestDiskPersistence
|
OperationalMode
|
|
Modo de persistência de disco.
|
|
status
|
DataflowStatus
|
|
O estado do fluxo de dados.
|
DataflowResource
Object
Recurso de fluxo de dados Instance dataflowProfile
| Name |
Tipo |
Description |
|
extendedLocation
|
ExtendedLocation
|
Localização de borda do recurso.
|
|
id
|
string
(arm-id)
|
ID de recurso totalmente qualificado para o recurso. Por exemplo, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
O nome do recurso
|
|
properties
|
DataflowProperties
|
As propriedades específicas do recurso para este recurso.
|
|
systemData
|
systemData
|
Metadados do Azure Resource Manager contendo informações createdBy e modifiedBy.
|
|
type
|
string
|
O tipo do recurso. Por exemplo, "Microsoft.Compute/virtualMachines" ou "Microsoft.Storage/storageAccounts"
|
DataflowSourceOperationSettings
Object
Propriedades da operação da fonte de fluxo de dados
| Name |
Tipo |
Default value |
Description |
|
assetRef
|
string
|
|
Referência ao recurso no Registro de Dispositivo do Azure de onde os dados no ponto de extremidade se originam.
|
|
dataSources
|
string[]
minLength: 1
|
|
Lista de locais de origem. Pode ser Broker ou tópicos Kafka. Suporta curingas # e +.
|
|
endpointRef
|
string
|
|
Referência ao recurso Dataflow Endpoint. Só pode ser do tipo Broker e Kafka.
|
|
schemaRef
|
string
|
|
Referência CR do esquema. Os dados serão desserializados de acordo com o esquema e descartados se não corresponderem.
|
|
serializationFormat
|
SourceSerializationFormat
|
Json
|
O conteúdo é um esquema JSON. Permitido: JSON Schema/draft-7.
|
DataflowStatus
Object
DataflowStatus status.
ErrorAdditionalInfo
Object
O erro de gerenciamento de recursos informações adicionais.
| Name |
Tipo |
Description |
|
info
|
object
|
As informações adicionais.
|
|
type
|
string
|
O tipo de informação adicional.
|
ErrorDetail
Object
O detalhe do erro.
| Name |
Tipo |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
O erro informações adicionais.
|
|
code
|
string
|
O código de erro.
|
|
details
|
ErrorDetail[]
|
Os detalhes do erro.
|
|
message
|
string
|
A mensagem de erro.
|
|
target
|
string
|
O destino do erro.
|
ErrorResponse
Object
Resposta de erro
| Name |
Tipo |
Description |
|
error
|
ErrorDetail
|
O objeto de erro.
|
ExtendedLocation
Object
O local estendido é uma extensão dos locais do Azure. Eles fornecem uma maneira de usar seus clusters Kubernetes habilitados para Azure ARC como locais de destino para implantar instâncias de serviços do Azure.
| Name |
Tipo |
Description |
|
name
|
string
|
O nome do local estendido.
|
|
type
|
ExtendedLocationType
|
Tipo de ExtendedLocation.
|
ExtendedLocationType
Enumeração
O enum que define o tipo de ExtendedLocation aceito.
| Valor |
Description |
|
CustomLocation
|
Tipo CustomLocation
|
FilterType
Enumeração
Propriedades de Tipo de Filtro
| Valor |
Description |
|
Filter
|
Tipo de filtro
|
OperationalMode
Enumeração
Propriedades do modo
| Valor |
Description |
|
Enabled
|
Enabled é equivalente a True
|
|
Disabled
|
Disabled é equivalente a False.
|
OperationType
Enumeração
Propriedades de Tipo de Operação de Fluxo de Dados
| Valor |
Description |
|
Source
|
Operação de origem do fluxo de dados
|
|
Destination
|
Operação de destino do fluxo de dados
|
|
BuiltInTransformation
|
Operação de transformação integrada de fluxo de dados
|
ProvisioningState
Enumeração
O enum que define o status do recurso.
| Valor |
Description |
|
Succeeded
|
O recurso foi criado.
|
|
Failed
|
Falha na criação de recursos.
|
|
Canceled
|
A criação de recursos foi cancelada.
|
|
Provisioning
|
O recurso está sendo provisionado.
|
|
Updating
|
O recurso está se atualizando.
|
|
Deleting
|
O recurso está sendo excluído.
|
|
Accepted
|
O recurso foi aceito.
|
ResourceHealthState
Enumeração
O estado de saúde do recurso.
| Valor |
Description |
|
Available
|
O recurso está disponível e funcionando conforme o esperado.
|
|
Degraded
|
A integridade dos recursos está degradada.
|
|
Unavailable
|
O recurso não está funcionando como esperado.
|
|
Unknown
|
O estado do recurso é desconhecido.
|
ResourceHealthStatus
Object
Representa o estado de saúde de um recurso.
| Name |
Tipo |
Description |
|
lastTransitionTime
|
string
|
O carimbo temporal (RFC3339) em que o estado de saúde foi alterado pela última vez.
|
|
lastUpdateTime
|
string
|
O carimbo temporal (RFC3339) em que o estado de saúde foi atualizado pela última vez, mesmo que o estado não tenha mudado.
|
|
message
|
string
|
Uma mensagem legível para humanos a descrever a última transição.
|
|
reasonCode
|
string
|
Código de razão único, CamelCase que descreve a causa da última transição do estado de saúde.
|
|
status
|
ResourceHealthState
|
O estado de saúde elevado do recurso.
|
Enumeração
Propriedades de formato de serialização
| Valor |
Description |
|
Json
|
Formato JSON
|
systemData
Object
Metadados referentes à criação e última modificação do recurso.
| Name |
Tipo |
Description |
|
createdAt
|
string
(date-time)
|
O carimbo de data/hora da criação de recursos (UTC).
|
|
createdBy
|
string
|
A identidade que criou o recurso.
|
|
createdByType
|
createdByType
|
O tipo de identidade que criou o recurso.
|
|
lastModifiedAt
|
string
(date-time)
|
O carimbo de data/hora da última modificação do recurso (UTC)
|
|
lastModifiedBy
|
string
|
A identidade que modificou o recurso pela última vez.
|
|
lastModifiedByType
|
createdByType
|
O tipo de identidade que modificou o recurso pela última vez.
|
Enumeração
Propriedades do Formato de Transformação
| Valor |
Description |
|
Delta
|
Formato Delta
|
|
Json
|
Formato JSON
|
|
Parquet
|
Formato Parquet
|