diff --git a/sdk/iotoperations/azure-resourcemanager-iotoperations/CHANGELOG.md b/sdk/iotoperations/azure-resourcemanager-iotoperations/CHANGELOG.md index 686bd0ccae3b..7991d3072ec3 100644 --- a/sdk/iotoperations/azure-resourcemanager-iotoperations/CHANGELOG.md +++ b/sdk/iotoperations/azure-resourcemanager-iotoperations/CHANGELOG.md @@ -1,14 +1,19 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2025-04-21) + +- Azure Resource Manager IoT Operations client library for Java. This package contains Microsoft Azure SDK for IoT Operations Management SDK. Microsoft.IoTOperations Resource Provider management API. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.InstanceFeature` was added + +* `models.InstanceFeatureMode` was added -### Bugs Fixed +#### `models.InstanceProperties` was modified -### Other Changes +* `withFeatures(java.util.Map)` was added +* `features()` was added ## 1.0.0 (2024-12-16) diff --git a/sdk/iotoperations/azure-resourcemanager-iotoperations/README.md b/sdk/iotoperations/azure-resourcemanager-iotoperations/README.md index 49714b1f5fe9..2c44f29bd69e 100644 --- a/sdk/iotoperations/azure-resourcemanager-iotoperations/README.md +++ b/sdk/iotoperations/azure-resourcemanager-iotoperations/README.md @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ IoTOperationsManager manager = IoTOperationsManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/iotoperations/azure-resourcemanager-iotoperations/SAMPLE.md b/sdk/iotoperations/azure-resourcemanager-iotoperations/SAMPLE.md index d394624bfdf8..7b50a42ab0a0 100644 --- a/sdk/iotoperations/azure-resourcemanager-iotoperations/SAMPLE.md +++ b/sdk/iotoperations/azure-resourcemanager-iotoperations/SAMPLE.md @@ -65,390 +65,346 @@ ### Broker_CreateOrUpdate ```java -import com.azure.resourcemanager.iotoperations.models.AdvancedSettings; -import com.azure.resourcemanager.iotoperations.models.BackendChain; -import com.azure.resourcemanager.iotoperations.models.BrokerDiagnostics; -import com.azure.resourcemanager.iotoperations.models.BrokerMemoryProfile; -import com.azure.resourcemanager.iotoperations.models.BrokerProperties; -import com.azure.resourcemanager.iotoperations.models.Cardinality; -import com.azure.resourcemanager.iotoperations.models.CertManagerCertOptions; -import com.azure.resourcemanager.iotoperations.models.CertManagerPrivateKey; -import com.azure.resourcemanager.iotoperations.models.ClientConfig; -import com.azure.resourcemanager.iotoperations.models.DiagnosticsLogs; -import com.azure.resourcemanager.iotoperations.models.DiskBackedMessageBuffer; +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.Frontend; -import com.azure.resourcemanager.iotoperations.models.GenerateResourceLimits; -import com.azure.resourcemanager.iotoperations.models.KubernetesReference; -import com.azure.resourcemanager.iotoperations.models.LocalKubernetesReference; -import com.azure.resourcemanager.iotoperations.models.Metrics; +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.OperatorValues; -import com.azure.resourcemanager.iotoperations.models.PrivateKeyAlgorithm; -import com.azure.resourcemanager.iotoperations.models.PrivateKeyRotationPolicy; -import com.azure.resourcemanager.iotoperations.models.SelfCheck; -import com.azure.resourcemanager.iotoperations.models.SelfTracing; -import com.azure.resourcemanager.iotoperations.models.SubscriberMessageDropStrategy; -import com.azure.resourcemanager.iotoperations.models.SubscriberQueueLimit; -import com.azure.resourcemanager.iotoperations.models.Traces; -import com.azure.resourcemanager.iotoperations.models.VolumeClaimResourceRequirements; -import com.azure.resourcemanager.iotoperations.models.VolumeClaimSpec; -import com.azure.resourcemanager.iotoperations.models.VolumeClaimSpecSelector; -import com.azure.resourcemanager.iotoperations.models.VolumeClaimSpecSelectorMatchExpressions; +import com.azure.resourcemanager.iotoperations.models.SourceSerializationFormat; +import com.azure.resourcemanager.iotoperations.models.TransformationSerializationFormat; import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; /** - * Samples for Broker CreateOrUpdate. + * Samples for Dataflow CreateOrUpdate. */ -public final class BrokerCreateOrUpdateSamples { +public final class DataflowCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Minimal.json + * x-ms-original-file: 2025-04-01/Dataflow_CreateOrUpdate_FilterToTopic.json */ /** - * Sample code: Broker_CreateOrUpdate_Minimal. + * Sample code: Dataflow_CreateOrUpdate_FilterToTopic. * * @param manager Entry point to IoTOperationsManager. */ public static void - brokerCreateOrUpdateMinimal(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokers() - .define("resource-name123") - .withExistingInstance("rgiotoperations", "resource-name123") + dataflowCreateOrUpdateFilterToTopic(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflows() + .define("mqtt-filter-to-topic") + .withExistingDataflowProfile("rgiotoperations", "resource-name123", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new BrokerProperties().withMemoryProfile(BrokerMemoryProfile.TINY)) + .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"))))) .create(); } /* - * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Complex.json + * x-ms-original-file: 2025-04-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: Broker_CreateOrUpdate_Complex. + * Sample code: Dataflow_CreateOrUpdate. * * @param manager Entry point to IoTOperationsManager. */ - public static void - brokerCreateOrUpdateComplex(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokers() + public static void dataflowCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflows() .define("resource-name123") - .withExistingInstance("rgiotoperations", "resource-name123") + .withExistingDataflowProfile("rgiotoperations", "resource-name123", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new BrokerProperties() - .withCardinality(new Cardinality() - .withBackendChain(new BackendChain().withPartitions(2).withRedundancyFactor(2).withWorkers(2)) - .withFrontend(new Frontend().withReplicas(2).withWorkers(2))) - .withDiskBackedMessageBuffer(new DiskBackedMessageBuffer().withMaxSize("50M")) - .withGenerateResourceLimits(new GenerateResourceLimits().withCpu(OperationalMode.ENABLED)) - .withMemoryProfile(BrokerMemoryProfile.MEDIUM)) + .withProperties( + new DataflowProperties().withMode(OperationalMode.ENABLED) + .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"))))) .create(); } /* - * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/Dataflow_CreateOrUpdate_ComplexContextualization.json */ /** - * Sample code: Broker_CreateOrUpdate. + * Sample code: Dataflow_CreateOrUpdate_ComplexContextualization. * * @param manager Entry point to IoTOperationsManager. */ - public static void brokerCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokers() - .define("resource-name123") - .withExistingInstance("rgiotoperations", "resource-name123") + public static void dataflowCreateOrUpdateComplexContextualization( + com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflows() + .define("aio-to-adx-contexualized") + .withExistingDataflowProfile("rgiotoperations", "resource-name123", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) .withProperties( - new BrokerProperties() - .withAdvanced(new AdvancedSettings() - .withClients(new ClientConfig().withMaxSessionExpirySeconds(3859) - .withMaxMessageExpirySeconds(3263) - .withMaxPacketSizeBytes(3029) - .withSubscriberQueueLimit(new SubscriberQueueLimit().withLength(6L) - .withStrategy(SubscriberMessageDropStrategy.NONE)) - .withMaxReceiveMaximum(2365) - .withMaxKeepAliveSeconds(3744)) - .withEncryptInternalTraffic(OperationalMode.ENABLED) - .withInternalCerts(new CertManagerCertOptions().withDuration("bchrc") - .withRenewBefore("xkafmpgjfifkwwrhkswtopdnne") - .withPrivateKey(new CertManagerPrivateKey().withAlgorithm(PrivateKeyAlgorithm.EC256) - .withRotationPolicy(PrivateKeyRotationPolicy.ALWAYS)))) - .withCardinality(new Cardinality() - .withBackendChain(new BackendChain().withPartitions(11).withRedundancyFactor(5).withWorkers(15)) - .withFrontend(new Frontend().withReplicas(2).withWorkers(6))) - .withDiagnostics(new BrokerDiagnostics() - .withLogs(new DiagnosticsLogs().withLevel("rnmwokumdmebpmfxxxzvvjfdywotav")) - .withMetrics(new Metrics().withPrometheusPort(7581)) - .withSelfCheck(new SelfCheck().withMode(OperationalMode.ENABLED) - .withIntervalSeconds(158) - .withTimeoutSeconds(14)) - .withTraces(new Traces().withMode(OperationalMode.ENABLED) - .withCacheSizeMegabytes(28) - .withSelfTracing( - new SelfTracing().withMode(OperationalMode.ENABLED).withIntervalSeconds(22)) - .withSpanChannelCapacity(1000))) - .withDiskBackedMessageBuffer(new DiskBackedMessageBuffer().withMaxSize("500M") - .withEphemeralVolumeClaimSpec(new VolumeClaimSpec().withVolumeName("c") - .withVolumeMode("rxvpksjuuugqnqzeiprocknbn") - .withStorageClassName("sseyhrjptkhrqvpdpjmornkqvon") - .withAccessModes(Arrays.asList("nuluhigrbb")) - .withDataSource(new LocalKubernetesReference().withApiGroup("npqapyksvvpkohujx") - .withKind("wazgyb") - .withName("cwhsgxxcxsyppoefm")) - .withDataSourceRef(new KubernetesReference().withApiGroup("mnfnykznjjsoqpfsgdqioupt") - .withKind("odynqzekfzsnawrctaxg") - .withName("envszivbbmixbyddzg") - .withNamespace("etcfzvxqd")) - .withResources(new VolumeClaimResourceRequirements() - .withLimits(mapOf("key2719", "fakeTokenPlaceholder")) - .withRequests(mapOf("key2909", "fakeTokenPlaceholder"))) - .withSelector(new VolumeClaimSpecSelector() - .withMatchExpressions(Arrays.asList( - new VolumeClaimSpecSelectorMatchExpressions().withKey("fakeTokenPlaceholder") - .withOperator(OperatorValues.IN) - .withValues(Arrays.asList("slmpajlywqvuyknipgztsonqyybt")))) - .withMatchLabels(mapOf("key6673", "fakeTokenPlaceholder")))) - .withPersistentVolumeClaimSpec(new VolumeClaimSpec().withVolumeName("c") - .withVolumeMode("rxvpksjuuugqnqzeiprocknbn") - .withStorageClassName("sseyhrjptkhrqvpdpjmornkqvon") - .withAccessModes(Arrays.asList("nuluhigrbb")) - .withDataSource(new LocalKubernetesReference().withApiGroup("npqapyksvvpkohujx") - .withKind("wazgyb") - .withName("cwhsgxxcxsyppoefm")) - .withDataSourceRef(new KubernetesReference().withApiGroup("mnfnykznjjsoqpfsgdqioupt") - .withKind("odynqzekfzsnawrctaxg") - .withName("envszivbbmixbyddzg") - .withNamespace("etcfzvxqd")) - .withResources(new VolumeClaimResourceRequirements() - .withLimits(mapOf("key2719", "fakeTokenPlaceholder")) - .withRequests(mapOf("key2909", "fakeTokenPlaceholder"))) - .withSelector(new VolumeClaimSpecSelector() - .withMatchExpressions(Arrays.asList( - new VolumeClaimSpecSelectorMatchExpressions().withKey("fakeTokenPlaceholder") - .withOperator(OperatorValues.IN) - .withValues(Arrays.asList("slmpajlywqvuyknipgztsonqyybt")))) - .withMatchLabels(mapOf("key6673", "fakeTokenPlaceholder"))))) - .withGenerateResourceLimits(new GenerateResourceLimits().withCpu(OperationalMode.ENABLED)) - .withMemoryProfile(BrokerMemoryProfile.TINY)) + 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"))))) .create(); } /* - * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Simple.json + * x-ms-original-file: 2025-04-01/Dataflow_CreateOrUpdate_ComplexEventHub.json */ /** - * Sample code: Broker_CreateOrUpdate_Simple. + * Sample code: Dataflow_CreateOrUpdate_ComplexEventHub. * * @param manager Entry point to IoTOperationsManager. */ public static void - brokerCreateOrUpdateSimple(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokers() - .define("resource-name123") - .withExistingInstance("rgiotoperations", "resource-name123") + dataflowCreateOrUpdateComplexEventHub(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflows() + .define("aio-to-event-hub-transformed") + .withExistingDataflowProfile("rgiotoperations", "resource-name123", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new BrokerProperties() - .withCardinality(new Cardinality() - .withBackendChain(new BackendChain().withPartitions(2).withRedundancyFactor(2).withWorkers(2)) - .withFrontend(new Frontend().withReplicas(2).withWorkers(2))) - .withGenerateResourceLimits(new GenerateResourceLimits().withCpu(OperationalMode.ENABLED)) - .withMemoryProfile(BrokerMemoryProfile.LOW)) + .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"))))) .create(); } - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### Broker_Delete - -```java -/** - * Samples for Broker Delete. - */ -public final class BrokerDeleteSamples { /* - * x-ms-original-file: 2024-11-01/Broker_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/Dataflow_CreateOrUpdate_SimpleFabric.json */ /** - * Sample code: Broker_Delete. + * Sample code: Dataflow_CreateOrUpdate_SimpleFabric. * * @param manager Entry point to IoTOperationsManager. */ - public static void brokerDelete(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokers() - .delete("rgiotoperations", "resource-name123", "resource-name123", com.azure.core.util.Context.NONE); + public static void + dataflowCreateOrUpdateSimpleFabric(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflows() + .define("aio-to-fabric") + .withExistingDataflowProfile("rgiotoperations", "resource-name123", "resource-name123") + .withExtendedLocation( + new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .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"))))) + .create(); } -} -``` - -### Broker_Get -```java -/** - * Samples for Broker Get. - */ -public final class BrokerGetSamples { /* - * x-ms-original-file: 2024-11-01/Broker_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json */ /** - * Sample code: Broker_Get. + * Sample code: Dataflow_CreateOrUpdate_SimpleEventGrid. * * @param manager Entry point to IoTOperationsManager. */ - public static void brokerGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokers() - .getWithResponse("rgiotoperations", "resource-name123", "resource-name123", - com.azure.core.util.Context.NONE); + public static void + dataflowCreateOrUpdateSimpleEventGrid(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflows() + .define("aio-to-event-grid") + .withExistingDataflowProfile("rgiotoperations", "resource-name123", "resource-name123") + .withExtendedLocation( + new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .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"))))) + .create(); } } ``` -### Broker_ListByResourceGroup +### Broker_Delete ```java /** - * Samples for Broker ListByResourceGroup. + * Samples for Dataflow Delete. */ -public final class BrokerListByResourceGroupSamples { +public final class DataflowDeleteSamples { /* - * x-ms-original-file: 2024-11-01/Broker_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/Dataflow_Delete_MaximumSet_Gen.json */ /** - * Sample code: Broker_ListByResourceGroup. + * Sample code: Dataflow_Delete. * * @param manager Entry point to IoTOperationsManager. */ - public static void brokerListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokers().listByResourceGroup("rgiotoperations", "resource-name123", com.azure.core.util.Context.NONE); + public static void dataflowDelete(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflows() + .delete("rgiotoperations", "resource-name123", "resource-name123", "resource-name123", + com.azure.core.util.Context.NONE); } } ``` -### BrokerAuthentication_CreateOrUpdate +### Broker_Get ```java -import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticationMethod; -import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticationProperties; -import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticatorCustomAuth; -import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticatorMethodCustom; -import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticatorMethodSat; -import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticatorMethodX509; -import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticatorMethodX509Attributes; -import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticatorMethods; -import com.azure.resourcemanager.iotoperations.models.ExtendedLocation; -import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType; -import com.azure.resourcemanager.iotoperations.models.X509ManualCertificate; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for BrokerAuthentication CreateOrUpdate. + * Samples for DataflowEndpoint Get. */ -public final class BrokerAuthenticationCreateOrUpdateSamples { - /* - * x-ms-original-file: 2024-11-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json - */ - /** - * Sample code: BrokerAuthentication_CreateOrUpdate. - * - * @param manager Entry point to IoTOperationsManager. - */ - public static void - brokerAuthenticationCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerAuthentications() - .define("resource-name123") - .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") - .withExtendedLocation( - new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties( - new BrokerAuthenticationProperties() - .withAuthenticationMethods( - Arrays - .asList(new BrokerAuthenticatorMethods().withMethod(BrokerAuthenticationMethod.CUSTOM) - .withCustomSettings(new BrokerAuthenticatorMethodCustom() - .withAuth(new BrokerAuthenticatorCustomAuth() - .withX509(new X509ManualCertificate().withSecretRef("fakeTokenPlaceholder"))) - .withCaCertConfigMap("pdecudefqyolvncbus") - .withEndpoint("https://www.example.com") - .withHeaders(mapOf("key8518", "fakeTokenPlaceholder"))) - .withServiceAccountTokenSettings( - new BrokerAuthenticatorMethodSat().withAudiences(Arrays.asList("jqyhyqatuydg"))) - .withX509Settings(new BrokerAuthenticatorMethodX509() - .withAuthorizationAttributes(mapOf("key3384", - new BrokerAuthenticatorMethodX509Attributes() - .withAttributes(mapOf("key186", "fakeTokenPlaceholder")) - .withSubject("jpgwctfeixitptfgfnqhua"))) - .withTrustedClientCaCert("vlctsqddl"))))) - .create(); - } - +public final class DataflowEndpointGetSamples { /* - * x-ms-original-file: 2024-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json + * x-ms-original-file: 2025-04-01/DataflowEndpoint_Get_MaximumSet_Gen.json */ /** - * Sample code: BrokerAuthentication_CreateOrUpdate_Complex. + * Sample code: DataflowEndpoint_Get. * * @param manager Entry point to IoTOperationsManager. */ - public static void brokerAuthenticationCreateOrUpdateComplex( - com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerAuthentications() - .define("resource-name123") - .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") - .withExtendedLocation( - new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new BrokerAuthenticationProperties().withAuthenticationMethods(Arrays.asList( - new BrokerAuthenticatorMethods().withMethod(BrokerAuthenticationMethod.SERVICE_ACCOUNT_TOKEN) - .withServiceAccountTokenSettings( - new BrokerAuthenticatorMethodSat().withAudiences(Arrays.asList("aio-internal"))), - new BrokerAuthenticatorMethods().withMethod(BrokerAuthenticationMethod.X509) - .withX509Settings(new BrokerAuthenticatorMethodX509().withAuthorizationAttributes(mapOf("root", - new BrokerAuthenticatorMethodX509Attributes().withAttributes(mapOf("organization", "contoso")) - .withSubject("CN = Contoso Root CA Cert, OU = Engineering, C = US"), - "intermediate", - new BrokerAuthenticatorMethodX509Attributes() - .withAttributes(mapOf("city", "seattle", "foo", "bar")) - .withSubject("CN = Contoso Intermediate CA"), - "smart-fan", - new BrokerAuthenticatorMethodX509Attributes().withAttributes(mapOf("building", "17")) - .withSubject("CN = smart-fan"))) - .withTrustedClientCaCert("my-ca"))))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + public static void dataflowEndpointGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowEndpoints() + .getWithResponse("rgiotoperations", "resource-name123", "resource-name123", + com.azure.core.util.Context.NONE); } } ``` -### BrokerAuthentication_Delete +### Broker_ListByResourceGroup ```java /** @@ -456,7 +412,7 @@ public final class BrokerAuthenticationCreateOrUpdateSamples { */ public final class BrokerAuthenticationDeleteSamples { /* - * x-ms-original-file: 2024-11-01/BrokerAuthentication_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/BrokerAuthentication_Delete_MaximumSet_Gen.json */ /** * Sample code: BrokerAuthentication_Delete. @@ -472,179 +428,105 @@ public final class BrokerAuthenticationDeleteSamples { } ``` -### BrokerAuthentication_Get +### BrokerAuthentication_CreateOrUpdate ```java /** - * Samples for BrokerAuthentication Get. + * Samples for BrokerListener ListByResourceGroup. */ -public final class BrokerAuthenticationGetSamples { +public final class BrokerListenerListByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: BrokerAuthentication_Get. + * Sample code: BrokerListener_ListByResourceGroup. * * @param manager Entry point to IoTOperationsManager. */ - public static void brokerAuthenticationGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerAuthentications() - .getWithResponse("rgiotoperations", "resource-name123", "resource-name123", "resource-name123", + public static void + brokerListenerListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerListeners() + .listByResourceGroup("rgiotoperations", "resource-name123", "resource-name123", com.azure.core.util.Context.NONE); } } ``` -### BrokerAuthentication_ListByResourceGroup +### BrokerAuthentication_Delete ```java /** - * Samples for BrokerAuthentication ListByResourceGroup. + * Samples for Broker ListByResourceGroup. */ -public final class BrokerAuthenticationListByResourceGroupSamples { +public final class BrokerListByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/Broker_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: BrokerAuthentication_ListByResourceGroup. + * Sample code: Broker_ListByResourceGroup. * * @param manager Entry point to IoTOperationsManager. */ - public static void - brokerAuthenticationListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerAuthentications() - .listByResourceGroup("rgiotoperations", "resource-name123", "resource-name123", - com.azure.core.util.Context.NONE); + public static void brokerListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokers().listByResourceGroup("rgiotoperations", "resource-name123", com.azure.core.util.Context.NONE); } } ``` -### BrokerAuthorization_CreateOrUpdate +### BrokerAuthentication_Get ```java -import com.azure.resourcemanager.iotoperations.models.AuthorizationConfig; -import com.azure.resourcemanager.iotoperations.models.AuthorizationRule; -import com.azure.resourcemanager.iotoperations.models.BrokerAuthorizationProperties; -import com.azure.resourcemanager.iotoperations.models.BrokerResourceDefinitionMethods; -import com.azure.resourcemanager.iotoperations.models.BrokerResourceRule; -import com.azure.resourcemanager.iotoperations.models.ExtendedLocation; -import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType; -import com.azure.resourcemanager.iotoperations.models.OperationalMode; -import com.azure.resourcemanager.iotoperations.models.PrincipalDefinition; -import com.azure.resourcemanager.iotoperations.models.StateStoreResourceDefinitionMethods; -import com.azure.resourcemanager.iotoperations.models.StateStoreResourceKeyTypes; -import com.azure.resourcemanager.iotoperations.models.StateStoreResourceRule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for BrokerAuthorization CreateOrUpdate. + * Samples for BrokerAuthorization ListByResourceGroup. */ -public final class BrokerAuthorizationCreateOrUpdateSamples { +public final class BrokerAuthorizationListByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: BrokerAuthorization_CreateOrUpdate. + * Sample code: BrokerAuthorization_ListByResourceGroup. * * @param manager Entry point to IoTOperationsManager. */ public static void - brokerAuthorizationCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + brokerAuthorizationListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { manager.brokerAuthorizations() - .define("resource-name123") - .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") - .withExtendedLocation( - new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new BrokerAuthorizationProperties() - .withAuthorizationPolicies(new AuthorizationConfig().withCache(OperationalMode.ENABLED) - .withRules(Arrays.asList(new AuthorizationRule() - .withBrokerResources( - Arrays.asList(new BrokerResourceRule().withMethod(BrokerResourceDefinitionMethods.CONNECT) - .withClientIds(Arrays.asList("nlc")) - .withTopics(Arrays.asList("wvuca")))) - .withPrincipals(new PrincipalDefinition() - .withAttributes(Arrays.asList(mapOf("key5526", "fakeTokenPlaceholder"))) - .withClientIds(Arrays.asList("smopeaeddsygz")) - .withUsernames(Arrays.asList("iozngyqndrteikszkbasinzdjtm"))) - .withStateStoreResources( - Arrays.asList(new StateStoreResourceRule().withKeyType(StateStoreResourceKeyTypes.PATTERN) - .withKeys(Arrays.asList("tkounsqtwvzyaklxjqoerpu")) - .withMethod(StateStoreResourceDefinitionMethods.READ))))))) - .create(); + .listByResourceGroup("rgiotoperations", "resource-name123", "resource-name123", + com.azure.core.util.Context.NONE); } +} +``` - /* - * x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Simple.json - */ - /** - * Sample code: BrokerAuthorization_CreateOrUpdate_Simple. - * - * @param manager Entry point to IoTOperationsManager. - */ - public static void - brokerAuthorizationCreateOrUpdateSimple(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerAuthorizations() - .define("resource-name123") - .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") - .withExtendedLocation( - new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new BrokerAuthorizationProperties() - .withAuthorizationPolicies(new AuthorizationConfig().withCache(OperationalMode.ENABLED) - .withRules(Arrays.asList(new AuthorizationRule() - .withBrokerResources( - Arrays.asList(new BrokerResourceRule().withMethod(BrokerResourceDefinitionMethods.CONNECT), - new BrokerResourceRule().withMethod(BrokerResourceDefinitionMethods.SUBSCRIBE) - .withTopics(Arrays.asList("topic", "topic/with/wildcard/#")))) - .withPrincipals(new PrincipalDefinition() - .withAttributes(Arrays.asList(mapOf("floor", "floor1", "site", "site1"))) - .withClientIds(Arrays.asList("my-client-id"))) - .withStateStoreResources( - Arrays.asList(new StateStoreResourceRule().withKeyType(StateStoreResourceKeyTypes.PATTERN) - .withKeys(Arrays.asList("*")) - .withMethod(StateStoreResourceDefinitionMethods.READ_WRITE))))))) - .create(); - } +### BrokerAuthentication_ListByResourceGroup +```java +import com.azure.resourcemanager.iotoperations.models.InstanceResource; +import com.azure.resourcemanager.iotoperations.models.ManagedServiceIdentity; +import com.azure.resourcemanager.iotoperations.models.ManagedServiceIdentityType; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Instance Update. + */ +public final class InstanceUpdateSamples { /* - * x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json + * x-ms-original-file: 2025-04-01/Instance_Update_MaximumSet_Gen.json */ /** - * Sample code: BrokerAuthorization_CreateOrUpdate_Complex. + * Sample code: Instance_Update. * * @param manager Entry point to IoTOperationsManager. */ - public static void - brokerAuthorizationCreateOrUpdateComplex(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerAuthorizations() - .define("resource-name123") - .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") - .withExtendedLocation( - new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new BrokerAuthorizationProperties() - .withAuthorizationPolicies(new AuthorizationConfig().withCache(OperationalMode.ENABLED) - .withRules(Arrays.asList(new AuthorizationRule() - .withBrokerResources(Arrays.asList( - new BrokerResourceRule().withMethod(BrokerResourceDefinitionMethods.CONNECT) - .withClientIds(Arrays.asList("{principal.attributes.building}*")), - new BrokerResourceRule().withMethod(BrokerResourceDefinitionMethods.PUBLISH) - .withTopics(Arrays.asList( - "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*")), - new BrokerResourceRule().withMethod(BrokerResourceDefinitionMethods.SUBSCRIBE) - .withTopics(Arrays.asList("commands/{principal.attributes.organization}")))) - .withPrincipals(new PrincipalDefinition() - .withAttributes(Arrays.asList(mapOf("building", "17", "organization", "contoso"))) - .withUsernames(Arrays.asList("temperature-sensor", "humidity-sensor"))) - .withStateStoreResources(Arrays.asList( - new StateStoreResourceRule().withKeyType(StateStoreResourceKeyTypes.PATTERN) - .withKeys(Arrays.asList("myreadkey", "myotherkey?", "mynumerickeysuffix[0-9]", - "clients:{principal.clientId}:*")) - .withMethod(StateStoreResourceDefinitionMethods.READ), - new StateStoreResourceRule().withKeyType(StateStoreResourceKeyTypes.BINARY) - .withKeys(Arrays.asList("MTE2IDEwMSAxMTUgMTE2")) - .withMethod(StateStoreResourceDefinitionMethods.READ_WRITE))))))) - .create(); + public static void instanceUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + InstanceResource resource = manager.instances() + .getByResourceGroupWithResponse("rgiotoperations", "aio-instance", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf())) + .apply(); } // Use "Map.of" if available @@ -661,72 +543,94 @@ public final class BrokerAuthorizationCreateOrUpdateSamples { } ``` -### BrokerAuthorization_Delete +### BrokerAuthorization_CreateOrUpdate ```java /** - * Samples for BrokerAuthorization Delete. + * Samples for BrokerListener Delete. */ -public final class BrokerAuthorizationDeleteSamples { +public final class BrokerListenerDeleteSamples { /* - * x-ms-original-file: 2024-11-01/BrokerAuthorization_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/BrokerListener_Delete_MaximumSet_Gen.json */ /** - * Sample code: BrokerAuthorization_Delete. + * Sample code: BrokerListener_Delete. * * @param manager Entry point to IoTOperationsManager. */ - public static void brokerAuthorizationDelete(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerAuthorizations() + public static void brokerListenerDelete(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerListeners() .delete("rgiotoperations", "resource-name123", "resource-name123", "resource-name123", com.azure.core.util.Context.NONE); } } ``` -### BrokerAuthorization_Get +### BrokerAuthorization_Delete ```java /** - * Samples for BrokerAuthorization Get. + * Samples for Dataflow ListByResourceGroup. */ -public final class BrokerAuthorizationGetSamples { +public final class DataflowListByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json */ /** - * Sample code: BrokerAuthorization_Get. + * Sample code: Dataflow_ListByProfileResource. * * @param manager Entry point to IoTOperationsManager. */ - public static void brokerAuthorizationGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerAuthorizations() - .getWithResponse("rgiotoperations", "resource-name123", "resource-name123", "resource-name123", + public static void + dataflowListByProfileResource(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflows() + .listByResourceGroup("rgiotoperations", "resource-name123", "resource-name123", com.azure.core.util.Context.NONE); } } ``` +### BrokerAuthorization_Get + +```java +/** + * Samples for Instance GetByResourceGroup. + */ +public final class InstanceGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-04-01/Instance_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Instance_Get. + * + * @param manager Entry point to IoTOperationsManager. + */ + public static void instanceGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.instances() + .getByResourceGroupWithResponse("rgiotoperations", "aio-instance", com.azure.core.util.Context.NONE); + } +} +``` + ### BrokerAuthorization_ListByResourceGroup ```java /** - * Samples for BrokerAuthorization ListByResourceGroup. + * Samples for DataflowProfile ListByResourceGroup. */ -public final class BrokerAuthorizationListByResourceGroupSamples { +public final class DataflowProfileListByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: BrokerAuthorization_ListByResourceGroup. + * Sample code: DataflowProfile_ListByResourceGroup. * * @param manager Entry point to IoTOperationsManager. */ public static void - brokerAuthorizationListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerAuthorizations() - .listByResourceGroup("rgiotoperations", "resource-name123", "resource-name123", - com.azure.core.util.Context.NONE); + dataflowProfileListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowProfiles() + .listByResourceGroup("rgiotoperations", "resource-name123", com.azure.core.util.Context.NONE); } } ``` @@ -734,142 +638,129 @@ public final class BrokerAuthorizationListByResourceGroupSamples { ### BrokerListener_CreateOrUpdate ```java -import com.azure.resourcemanager.iotoperations.models.BrokerListenerProperties; -import com.azure.resourcemanager.iotoperations.models.BrokerProtocolType; -import com.azure.resourcemanager.iotoperations.models.CertManagerCertificateSpec; -import com.azure.resourcemanager.iotoperations.models.CertManagerIssuerKind; -import com.azure.resourcemanager.iotoperations.models.CertManagerIssuerRef; -import com.azure.resourcemanager.iotoperations.models.CertManagerPrivateKey; import com.azure.resourcemanager.iotoperations.models.ExtendedLocation; import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType; -import com.azure.resourcemanager.iotoperations.models.ListenerPort; -import com.azure.resourcemanager.iotoperations.models.PrivateKeyAlgorithm; -import com.azure.resourcemanager.iotoperations.models.PrivateKeyRotationPolicy; -import com.azure.resourcemanager.iotoperations.models.SanForCert; -import com.azure.resourcemanager.iotoperations.models.ServiceType; -import com.azure.resourcemanager.iotoperations.models.TlsCertMethod; -import com.azure.resourcemanager.iotoperations.models.TlsCertMethodMode; -import com.azure.resourcemanager.iotoperations.models.X509ManualCertificate; -import java.util.Arrays; +import com.azure.resourcemanager.iotoperations.models.InstanceProperties; +import com.azure.resourcemanager.iotoperations.models.ManagedServiceIdentity; +import com.azure.resourcemanager.iotoperations.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.iotoperations.models.SchemaRegistryRef; +import java.util.HashMap; +import java.util.Map; /** - * Samples for BrokerListener CreateOrUpdate. + * Samples for Instance CreateOrUpdate. */ -public final class BrokerListenerCreateOrUpdateSamples { +public final class InstanceCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/Instance_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: BrokerListener_CreateOrUpdate. + * Sample code: Instance_CreateOrUpdate. * * @param manager Entry point to IoTOperationsManager. */ - public static void - brokerListenerCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerListeners() - .define("resource-name123") - .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") + public static void instanceCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.instances() + .define("aio-instance") + .withRegion("xvewadyhycrjpu") + .withExistingResourceGroup("rgiotoperations") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new BrokerListenerProperties().withServiceName("tpfiszlapdpxktx") - .withPorts(Arrays.asList(new ListenerPort().withAuthenticationRef("tjvdroaqqy") - .withAuthorizationRef("fakeTokenPlaceholder") - .withNodePort(7281) - .withPort(1268) - .withProtocol(BrokerProtocolType.MQTT) - .withTls(new TlsCertMethod().withMode(TlsCertMethodMode.AUTOMATIC) - .withCertManagerCertificateSpec(new CertManagerCertificateSpec().withDuration("qmpeffoksron") - .withSecretName("fakeTokenPlaceholder") - .withRenewBefore("hutno") - .withIssuerRef(new CertManagerIssuerRef().withGroup("jtmuladdkpasfpoyvewekmiy") - .withKind(CertManagerIssuerKind.ISSUER) - .withName("ocwoqpgucvjrsuudtjhb")) - .withPrivateKey(new CertManagerPrivateKey().withAlgorithm(PrivateKeyAlgorithm.EC256) - .withRotationPolicy(PrivateKeyRotationPolicy.ALWAYS)) - .withSan(new SanForCert().withDns(Arrays.asList("xhvmhrrhgfsapocjeebqtnzarlj")) - .withIp(Arrays.asList("zbgugfzcgsmegevzktsnibyuyp")))) - .withManual(new X509ManualCertificate().withSecretRef("fakeTokenPlaceholder"))))) - .withServiceType(ServiceType.CLUSTER_IP)) + .withTags(mapOf()) + .withProperties(new InstanceProperties().withDescription("kpqtgocs") + .withSchemaRegistryRef(new SchemaRegistryRef().withResourceId( + "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123"))) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf())) .create(); } + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### BrokerListener_Delete + +```java +import com.azure.resourcemanager.iotoperations.models.DataflowProfileProperties; +import com.azure.resourcemanager.iotoperations.models.DiagnosticsLogs; +import com.azure.resourcemanager.iotoperations.models.ExtendedLocation; +import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType; +import com.azure.resourcemanager.iotoperations.models.Metrics; +import com.azure.resourcemanager.iotoperations.models.ProfileDiagnostics; + +/** + * Samples for DataflowProfile CreateOrUpdate. + */ +public final class DataflowProfileCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_Simple.json + * x-ms-original-file: 2025-04-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: BrokerListener_CreateOrUpdate_Simple. + * Sample code: DataflowProfile_CreateOrUpdate. * * @param manager Entry point to IoTOperationsManager. */ public static void - brokerListenerCreateOrUpdateSimple(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerListeners() + dataflowProfileCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowProfiles() .define("resource-name123") - .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") + .withExistingInstance("rgiotoperations", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new BrokerListenerProperties().withPorts(Arrays.asList(new ListenerPort().withPort(1883)))) + .withProperties(new DataflowProfileProperties().withDiagnostics( + new ProfileDiagnostics().withLogs(new DiagnosticsLogs().withLevel("rnmwokumdmebpmfxxxzvvjfdywotav")) + .withMetrics(new Metrics().withPrometheusPort(7581))) + .withInstanceCount(14)) .create(); } /* - * x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_Complex.json + * x-ms-original-file: 2025-04-01/DataflowProfile_CreateOrUpdate_Minimal.json */ /** - * Sample code: BrokerListener_CreateOrUpdate_Complex. + * Sample code: DataflowProfile_CreateOrUpdate_Minimal. * * @param manager Entry point to IoTOperationsManager. */ public static void - brokerListenerCreateOrUpdateComplex(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerListeners() - .define("resource-name123") - .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") + dataflowProfileCreateOrUpdateMinimal(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowProfiles() + .define("aio-dataflowprofile") + .withExistingInstance("rgiotoperations", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new BrokerListenerProperties() - .withPorts(Arrays.asList( - new ListenerPort().withAuthenticationRef("example-authentication") - .withPort(8080) - .withProtocol(BrokerProtocolType.WEB_SOCKETS), - new ListenerPort().withAuthenticationRef("example-authentication") - .withPort(8443) - .withProtocol(BrokerProtocolType.WEB_SOCKETS) - .withTls(new TlsCertMethod().withMode(TlsCertMethodMode.AUTOMATIC) - .withCertManagerCertificateSpec(new CertManagerCertificateSpec() - .withIssuerRef(new CertManagerIssuerRef().withGroup("jtmuladdkpasfpoyvewekmiy") - .withKind(CertManagerIssuerKind.ISSUER) - .withName("example-issuer")))), - new ListenerPort().withAuthenticationRef("example-authentication").withPort(1883), - new ListenerPort().withAuthenticationRef("example-authentication") - .withPort(8883) - .withTls(new TlsCertMethod().withMode(TlsCertMethodMode.MANUAL) - .withManual(new X509ManualCertificate().withSecretRef("fakeTokenPlaceholder"))))) - .withServiceType(ServiceType.LOAD_BALANCER)) + .withProperties(new DataflowProfileProperties().withInstanceCount(1)) .create(); } -} -``` -### BrokerListener_Delete - -```java -/** - * Samples for BrokerListener Delete. - */ -public final class BrokerListenerDeleteSamples { /* - * x-ms-original-file: 2024-11-01/BrokerListener_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/DataflowProfile_CreateOrUpdate_Multi.json */ /** - * Sample code: BrokerListener_Delete. + * Sample code: DataflowProfile_CreateOrUpdate_Multi. * * @param manager Entry point to IoTOperationsManager. */ - public static void brokerListenerDelete(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerListeners() - .delete("rgiotoperations", "resource-name123", "resource-name123", "resource-name123", - com.azure.core.util.Context.NONE); + public static void + dataflowProfileCreateOrUpdateMulti(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowProfiles() + .define("aio-dataflowprofile") + .withExistingInstance("rgiotoperations", "resource-name123") + .withExtendedLocation( + new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withProperties(new DataflowProfileProperties().withInstanceCount(3)) + .create(); } } ``` @@ -878,19 +769,19 @@ public final class BrokerListenerDeleteSamples { ```java /** - * Samples for BrokerListener Get. + * Samples for BrokerAuthentication Get. */ -public final class BrokerListenerGetSamples { +public final class BrokerAuthenticationGetSamples { /* - * x-ms-original-file: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/BrokerAuthentication_Get_MaximumSet_Gen.json */ /** - * Sample code: BrokerListener_Get. + * Sample code: BrokerAuthentication_Get. * * @param manager Entry point to IoTOperationsManager. */ - public static void brokerListenerGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerListeners() + public static void brokerAuthenticationGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerAuthentications() .getWithResponse("rgiotoperations", "resource-name123", "resource-name123", "resource-name123", com.azure.core.util.Context.NONE); } @@ -900,822 +791,930 @@ public final class BrokerListenerGetSamples { ### BrokerListener_ListByResourceGroup ```java -/** - * Samples for BrokerListener ListByResourceGroup. - */ -public final class BrokerListenerListByResourceGroupSamples { - /* - * x-ms-original-file: 2024-11-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json - */ - /** - * Sample code: BrokerListener_ListByResourceGroup. - * - * @param manager Entry point to IoTOperationsManager. - */ - public static void - brokerListenerListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.brokerListeners() - .listByResourceGroup("rgiotoperations", "resource-name123", "resource-name123", - com.azure.core.util.Context.NONE); - } -} -``` - -### Dataflow_CreateOrUpdate - -```java -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.BatchingConfiguration; +import com.azure.resourcemanager.iotoperations.models.BrokerProtocolType; +import com.azure.resourcemanager.iotoperations.models.CloudEventAttributeType; +import com.azure.resourcemanager.iotoperations.models.DataExplorerAuthMethod; +import com.azure.resourcemanager.iotoperations.models.DataLakeStorageAuthMethod; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationAccessToken; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationSasl; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationSaslType; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationServiceAccountToken; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationSystemAssignedManagedIdentity; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationUserAssignedManagedIdentity; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationX509; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointDataExplorer; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointDataExplorerAuthentication; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointDataLakeStorage; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointDataLakeStorageAuthentication; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointFabricOneLake; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointFabricOneLakeAuthentication; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointFabricOneLakeNames; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointFabricPathType; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointKafka; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointKafkaAcks; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointKafkaAuthentication; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointKafkaBatching; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointKafkaCompression; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointKafkaPartitionStrategy; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointLocalStorage; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointMqtt; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointMqttAuthentication; +import com.azure.resourcemanager.iotoperations.models.DataflowEndpointProperties; +import com.azure.resourcemanager.iotoperations.models.EndpointType; 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.FabricOneLakeAuthMethod; +import com.azure.resourcemanager.iotoperations.models.KafkaAuthMethod; +import com.azure.resourcemanager.iotoperations.models.MqttAuthMethod; +import com.azure.resourcemanager.iotoperations.models.MqttRetainType; 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; +import com.azure.resourcemanager.iotoperations.models.TlsProperties; /** - * Samples for Dataflow CreateOrUpdate. + * Samples for DataflowEndpoint CreateOrUpdate. */ -public final class DataflowCreateOrUpdateSamples { +public final class DataflowEndpointCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_FilterToTopic.json + * x-ms-original-file: 2025-04-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json */ /** - * Sample code: Dataflow_CreateOrUpdate_FilterToTopic. + * Sample code: DataflowEndpoint_CreateOrUpdate_EventGrid. * * @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") + dataflowEndpointCreateOrUpdateEventGrid(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowEndpoints() + .define("event-grid-endpoint") + .withExistingInstance("rgiotoperations", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .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"))))) + .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.MQTT) + .withMqttSettings(new DataflowEndpointMqtt() + .withAuthentication(new DataflowEndpointMqttAuthentication() + .withMethod(MqttAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) + .withSystemAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationSystemAssignedManagedIdentity())) + .withHost("example.westeurope-1.ts.eventgrid.azure.net:8883") + .withTls(new TlsProperties().withMode(OperationalMode.ENABLED)))) .create(); } /* - * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json */ /** - * Sample code: Dataflow_CreateOrUpdate. + * Sample code: DataflowEndpoint_CreateOrUpdate_ADLSv2. * * @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") - .withExtendedLocation( + public static void + dataflowEndpointCreateOrUpdateADLSv2(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowEndpoints() + .define("adlsv2-endpoint") + .withExistingInstance("rgiotoperations", "resource-name123") + .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties( - new DataflowProperties().withMode(OperationalMode.ENABLED) - .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"))))) + .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.DATA_LAKE_STORAGE) + .withDataLakeStorageSettings( + new DataflowEndpointDataLakeStorage() + .withAuthentication( + new DataflowEndpointDataLakeStorageAuthentication() + .withMethod(DataLakeStorageAuthMethod.ACCESS_TOKEN) + .withAccessTokenSettings(new DataflowEndpointAuthenticationAccessToken() + .withSecretRef("fakeTokenPlaceholder"))) + .withHost("example.blob.core.windows.net"))) .create(); } /* - * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json + * x-ms-original-file: 2025-04-01/DataflowEndpoint_CreateOrUpdate_EventHub.json */ /** - * Sample code: Dataflow_CreateOrUpdate_ComplexContextualization. + * Sample code: DataflowEndpoint_CreateOrUpdate_EventHub. * * @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") + public static void + dataflowEndpointCreateOrUpdateEventHub(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowEndpoints() + .define("event-hub-endpoint") + .withExistingInstance("rgiotoperations", "resource-name123") + .withExtendedLocation( + new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.KAFKA) + .withKafkaSettings(new DataflowEndpointKafka() + .withAuthentication(new DataflowEndpointKafkaAuthentication() + .withMethod(KafkaAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) + .withSystemAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationSystemAssignedManagedIdentity())) + .withConsumerGroupId("aiodataflows") + .withHost("example.servicebus.windows.net:9093") + .withTls(new TlsProperties().withMode(OperationalMode.ENABLED)))) + .create(); + } + + /* + * x-ms-original-file: 2025-04-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: DataflowEndpoint_CreateOrUpdate. + * + * @param manager Entry point to IoTOperationsManager. + */ + public static void + dataflowEndpointCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowEndpoints() + .define("resource-name123") + .withExistingInstance("rgiotoperations", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) .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"))))) + new DataflowEndpointProperties().withEndpointType(EndpointType.DATA_EXPLORER) + .withDataExplorerSettings( + new DataflowEndpointDataExplorer() + .withAuthentication( + new DataflowEndpointDataExplorerAuthentication() + .withMethod(DataExplorerAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) + .withSystemAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationSystemAssignedManagedIdentity() + .withAudience("psxomrfbhoflycm")) + .withUserAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationUserAssignedManagedIdentity() + .withClientId("fb90f267-8872-431a-a76a-a1cec5d3c4d2") + .withScope("zop") + .withTenantId("ed060aa2-71ff-4d3f-99c4-a9138356fdec"))) + .withDatabase("yqcdpjsifm") + .withHost("..kusto.windows.net") + .withBatching(new BatchingConfiguration().withLatencySeconds(9312).withMaxMessages(9028))) + .withDataLakeStorageSettings( + new DataflowEndpointDataLakeStorage() + .withAuthentication(new DataflowEndpointDataLakeStorageAuthentication() + .withMethod(DataLakeStorageAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) + .withAccessTokenSettings(new DataflowEndpointAuthenticationAccessToken() + .withSecretRef("fakeTokenPlaceholder")) + .withSystemAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationSystemAssignedManagedIdentity() + .withAudience("psxomrfbhoflycm")) + .withUserAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationUserAssignedManagedIdentity() + .withClientId("fb90f267-8872-431a-a76a-a1cec5d3c4d2") + .withScope("zop") + .withTenantId("ed060aa2-71ff-4d3f-99c4-a9138356fdec"))) + .withHost(".blob.core.windows.net") + .withBatching(new BatchingConfiguration().withLatencySeconds(9312).withMaxMessages(9028))) + .withFabricOneLakeSettings(new DataflowEndpointFabricOneLake() + .withAuthentication(new DataflowEndpointFabricOneLakeAuthentication() + .withMethod(FabricOneLakeAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) + .withSystemAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationSystemAssignedManagedIdentity() + .withAudience("psxomrfbhoflycm")) + .withUserAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationUserAssignedManagedIdentity() + .withClientId("fb90f267-8872-431a-a76a-a1cec5d3c4d2") + .withScope("zop") + .withTenantId("ed060aa2-71ff-4d3f-99c4-a9138356fdec"))) + .withNames(new DataflowEndpointFabricOneLakeNames().withLakehouseName("wpeathi") + .withWorkspaceName("nwgmitkbljztgms")) + .withOneLakePathType(DataflowEndpointFabricPathType.FILES) + .withHost("https://.fabric.microsoft.com") + .withBatching(new BatchingConfiguration().withLatencySeconds(9312).withMaxMessages(9028))) + .withKafkaSettings(new DataflowEndpointKafka() + .withAuthentication(new DataflowEndpointKafkaAuthentication() + .withMethod(KafkaAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) + .withSystemAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationSystemAssignedManagedIdentity() + .withAudience("psxomrfbhoflycm")) + .withUserAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationUserAssignedManagedIdentity() + .withClientId("fb90f267-8872-431a-a76a-a1cec5d3c4d2") + .withScope("zop") + .withTenantId("ed060aa2-71ff-4d3f-99c4-a9138356fdec")) + .withSaslSettings(new DataflowEndpointAuthenticationSasl() + .withSaslType(DataflowEndpointAuthenticationSaslType.PLAIN) + .withSecretRef("fakeTokenPlaceholder")) + .withX509CertificateSettings( + new DataflowEndpointAuthenticationX509().withSecretRef("fakeTokenPlaceholder"))) + .withConsumerGroupId("ukkzcjiyenhxokat") + .withHost("pwcqfiqclcgneolpewnyavoulbip") + .withBatching(new DataflowEndpointKafkaBatching().withMode(OperationalMode.ENABLED) + .withLatencyMs(3679) + .withMaxBytes(8887) + .withMaxMessages(2174)) + .withCopyMqttProperties(OperationalMode.ENABLED) + .withCompression(DataflowEndpointKafkaCompression.NONE) + .withKafkaAcks(DataflowEndpointKafkaAcks.ZERO) + .withPartitionStrategy(DataflowEndpointKafkaPartitionStrategy.DEFAULT) + .withTls(new TlsProperties().withMode(OperationalMode.ENABLED) + .withTrustedCaCertificateConfigMapRef("tectjjvukvelsreihwadh")) + .withCloudEventAttributes(CloudEventAttributeType.fromString("PassThrough"))) + .withLocalStorageSettings( + new DataflowEndpointLocalStorage().withPersistentVolumeClaimRef("jjwqwvd")) + .withMqttSettings(new DataflowEndpointMqtt() + .withAuthentication(new DataflowEndpointMqttAuthentication() + .withMethod(MqttAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) + .withSystemAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationSystemAssignedManagedIdentity() + .withAudience("psxomrfbhoflycm")) + .withUserAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationUserAssignedManagedIdentity() + .withClientId("fb90f267-8872-431a-a76a-a1cec5d3c4d2") + .withScope("zop") + .withTenantId("ed060aa2-71ff-4d3f-99c4-a9138356fdec")) + .withServiceAccountTokenSettings(new DataflowEndpointAuthenticationServiceAccountToken() + .withAudience("ejbklrbxgjaqleoycgpje")) + .withX509CertificateSettings( + new DataflowEndpointAuthenticationX509().withSecretRef("fakeTokenPlaceholder"))) + .withClientIdPrefix("kkljsdxdirfhwxtkavldekeqhv") + .withHost("nyhnxqnbspstctl") + .withProtocol(BrokerProtocolType.MQTT) + .withKeepAliveSeconds(0) + .withRetain(MqttRetainType.KEEP) + .withMaxInflightMessages(0) + .withQos(1) + .withSessionExpirySeconds(0) + .withTls(new TlsProperties().withMode(OperationalMode.ENABLED) + .withTrustedCaCertificateConfigMapRef("tectjjvukvelsreihwadh")) + .withCloudEventAttributes(CloudEventAttributeType.fromString("PassThrough")))) + .create(); + } + + /* + * x-ms-original-file: 2025-04-01/DataflowEndpoint_CreateOrUpdate_ADX.json + */ + /** + * Sample code: DataflowEndpoint_CreateOrUpdate_ADX. + * + * @param manager Entry point to IoTOperationsManager. + */ + public static void + dataflowEndpointCreateOrUpdateADX(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowEndpoints() + .define("adx-endpoint") + .withExistingInstance("rgiotoperations", "resource-name123") + .withExtendedLocation( + new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.DATA_EXPLORER) + .withDataExplorerSettings(new DataflowEndpointDataExplorer() + .withAuthentication(new DataflowEndpointDataExplorerAuthentication() + .withMethod(DataExplorerAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) + .withSystemAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationSystemAssignedManagedIdentity())) + .withDatabase("example-database") + .withHost("example.westeurope.kusto.windows.net") + .withBatching(new BatchingConfiguration().withLatencySeconds(9312).withMaxMessages(9028)))) + .create(); + } + + /* + * x-ms-original-file: 2025-04-01/DataflowEndpoint_CreateOrUpdate_Fabric.json + */ + /** + * Sample code: DataflowEndpoint_CreateOrUpdate_Fabric. + * + * @param manager Entry point to IoTOperationsManager. + */ + public static void + dataflowEndpointCreateOrUpdateFabric(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowEndpoints() + .define("fabric-endpoint") + .withExistingInstance("rgiotoperations", "resource-name123") + .withExtendedLocation( + new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.FABRIC_ONE_LAKE) + .withFabricOneLakeSettings(new DataflowEndpointFabricOneLake() + .withAuthentication(new DataflowEndpointFabricOneLakeAuthentication() + .withMethod(FabricOneLakeAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) + .withSystemAssignedManagedIdentitySettings( + new DataflowEndpointAuthenticationSystemAssignedManagedIdentity())) + .withNames(new DataflowEndpointFabricOneLakeNames().withLakehouseName("example-lakehouse") + .withWorkspaceName("example-workspace")) + .withOneLakePathType(DataflowEndpointFabricPathType.TABLES) + .withHost("onelake.dfs.fabric.microsoft.com"))) .create(); } /* - * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_ComplexEventHub.json + * x-ms-original-file: 2025-04-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json */ /** - * Sample code: Dataflow_CreateOrUpdate_ComplexEventHub. + * Sample code: DataflowEndpoint_CreateOrUpdate_LocalStorage. * * @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") + public static void dataflowEndpointCreateOrUpdateLocalStorage( + com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowEndpoints() + .define("local-storage-endpoint") + .withExistingInstance("rgiotoperations", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .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"))))) + .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.LOCAL_STORAGE) + .withLocalStorageSettings( + new DataflowEndpointLocalStorage().withPersistentVolumeClaimRef("example-pvc"))) .create(); } /* - * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_SimpleFabric.json + * x-ms-original-file: 2025-04-01/DataflowEndpoint_CreateOrUpdate_AIO.json */ /** - * Sample code: Dataflow_CreateOrUpdate_SimpleFabric. + * Sample code: DataflowEndpoint_CreateOrUpdate_AIO. * * @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") + dataflowEndpointCreateOrUpdateAIO(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowEndpoints() + .define("aio-builtin-broker-endpoint") + .withExistingInstance("rgiotoperations", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) .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"))))) + new DataflowEndpointProperties().withEndpointType(EndpointType.MQTT) + .withMqttSettings(new DataflowEndpointMqtt() + .withAuthentication( + new DataflowEndpointMqttAuthentication().withMethod(MqttAuthMethod.fromString("Kubernetes")) + .withServiceAccountTokenSettings(new DataflowEndpointAuthenticationServiceAccountToken() + .withAudience("aio-internal"))) + .withHost("aio-broker:18883") + .withTls(new TlsProperties().withMode(OperationalMode.ENABLED) + .withTrustedCaCertificateConfigMapRef("aio-ca-trust-bundle-test-only")))) .create(); } /* - * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json + * x-ms-original-file: 2025-04-01/DataflowEndpoint_CreateOrUpdate_MQTT.json */ /** - * Sample code: Dataflow_CreateOrUpdate_SimpleEventGrid. + * Sample code: DataflowEndpoint_CreateOrUpdate_MQTT. * * @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") + dataflowEndpointCreateOrUpdateMQTT(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowEndpoints() + .define("generic-mqtt-broker-endpoint") + .withExistingInstance("rgiotoperations", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .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"))))) + .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.MQTT) + .withMqttSettings(new DataflowEndpointMqtt() + .withAuthentication( + new DataflowEndpointMqttAuthentication().withMethod(MqttAuthMethod.X509CERTIFICATE) + .withX509CertificateSettings( + new DataflowEndpointAuthenticationX509().withSecretRef("fakeTokenPlaceholder"))) + .withClientIdPrefix("factory-gateway") + .withHost("example.broker.local:1883") + .withProtocol(BrokerProtocolType.WEB_SOCKETS) + .withKeepAliveSeconds(60) + .withRetain(MqttRetainType.KEEP) + .withMaxInflightMessages(100) + .withQos(1) + .withSessionExpirySeconds(3600) + .withTls(new TlsProperties().withMode(OperationalMode.DISABLED)))) .create(); } -} -``` - -### Dataflow_Delete -```java -/** - * Samples for Dataflow Delete. - */ -public final class DataflowDeleteSamples { /* - * x-ms-original-file: 2024-11-01/Dataflow_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/DataflowEndpoint_CreateOrUpdate_Kafka.json */ /** - * Sample code: Dataflow_Delete. + * Sample code: DataflowEndpoint_CreateOrUpdate_Kafka. * * @param manager Entry point to IoTOperationsManager. */ - public static void dataflowDelete(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflows() - .delete("rgiotoperations", "resource-name123", "resource-name123", "resource-name123", - com.azure.core.util.Context.NONE); + public static void + dataflowEndpointCreateOrUpdateKafka(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowEndpoints() + .define("generic-kafka-endpoint") + .withExistingInstance("rgiotoperations", "resource-name123") + .withExtendedLocation( + new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.KAFKA) + .withKafkaSettings(new DataflowEndpointKafka() + .withAuthentication(new DataflowEndpointKafkaAuthentication().withMethod(KafkaAuthMethod.SASL) + .withSaslSettings(new DataflowEndpointAuthenticationSasl() + .withSaslType(DataflowEndpointAuthenticationSaslType.PLAIN) + .withSecretRef("fakeTokenPlaceholder"))) + .withConsumerGroupId("dataflows") + .withHost("example.kafka.local:9093") + .withBatching(new DataflowEndpointKafkaBatching().withMode(OperationalMode.ENABLED) + .withLatencyMs(5) + .withMaxBytes(1000000) + .withMaxMessages(100000)) + .withCopyMqttProperties(OperationalMode.ENABLED) + .withCompression(DataflowEndpointKafkaCompression.GZIP) + .withKafkaAcks(DataflowEndpointKafkaAcks.ALL) + .withPartitionStrategy(DataflowEndpointKafkaPartitionStrategy.DEFAULT) + .withTls(new TlsProperties().withMode(OperationalMode.ENABLED) + .withTrustedCaCertificateConfigMapRef("ca-certificates")) + .withCloudEventAttributes(CloudEventAttributeType.PROPAGATE))) + .create(); } } ``` -### Dataflow_Get +### Dataflow_CreateOrUpdate ```java /** - * Samples for Dataflow Get. + * Samples for DataflowEndpoint ListByResourceGroup. */ -public final class DataflowGetSamples { +public final class DataflowEndpointListByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: Dataflow_Get. + * Sample code: DataflowEndpoint_ListByResourceGroup. * * @param manager Entry point to IoTOperationsManager. */ - public static void dataflowGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflows() - .getWithResponse("rgiotoperations", "resource-name123", "resource-name123", "resource-name123", - com.azure.core.util.Context.NONE); + public static void + dataflowEndpointListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowEndpoints() + .listByResourceGroup("rgiotoperations", "resource-name123", com.azure.core.util.Context.NONE); } } ``` -### Dataflow_ListByResourceGroup +### Dataflow_Delete ```java /** - * Samples for Dataflow ListByResourceGroup. + * Samples for DataflowProfile Delete. */ -public final class DataflowListByResourceGroupSamples { +public final class DataflowProfileDeleteSamples { /* - * x-ms-original-file: 2024-11-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/DataflowProfile_Delete_MaximumSet_Gen.json */ /** - * Sample code: Dataflow_ListByProfileResource. + * Sample code: DataflowProfile_Delete. * * @param manager Entry point to IoTOperationsManager. */ - public static void - dataflowListByProfileResource(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflows() - .listByResourceGroup("rgiotoperations", "resource-name123", "resource-name123", - com.azure.core.util.Context.NONE); - } -} -``` - -### DataflowEndpoint_CreateOrUpdate - -```java -import com.azure.resourcemanager.iotoperations.models.BatchingConfiguration; -import com.azure.resourcemanager.iotoperations.models.BrokerProtocolType; -import com.azure.resourcemanager.iotoperations.models.CloudEventAttributeType; -import com.azure.resourcemanager.iotoperations.models.DataExplorerAuthMethod; -import com.azure.resourcemanager.iotoperations.models.DataLakeStorageAuthMethod; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationAccessToken; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationSasl; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationSaslType; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationServiceAccountToken; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationSystemAssignedManagedIdentity; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationUserAssignedManagedIdentity; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointAuthenticationX509; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointDataExplorer; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointDataExplorerAuthentication; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointDataLakeStorage; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointDataLakeStorageAuthentication; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointFabricOneLake; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointFabricOneLakeAuthentication; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointFabricOneLakeNames; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointFabricPathType; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointKafka; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointKafkaAcks; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointKafkaAuthentication; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointKafkaBatching; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointKafkaCompression; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointKafkaPartitionStrategy; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointLocalStorage; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointMqtt; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointMqttAuthentication; -import com.azure.resourcemanager.iotoperations.models.DataflowEndpointProperties; -import com.azure.resourcemanager.iotoperations.models.EndpointType; -import com.azure.resourcemanager.iotoperations.models.ExtendedLocation; -import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType; -import com.azure.resourcemanager.iotoperations.models.FabricOneLakeAuthMethod; -import com.azure.resourcemanager.iotoperations.models.KafkaAuthMethod; -import com.azure.resourcemanager.iotoperations.models.MqttAuthMethod; -import com.azure.resourcemanager.iotoperations.models.MqttRetainType; -import com.azure.resourcemanager.iotoperations.models.OperationalMode; -import com.azure.resourcemanager.iotoperations.models.TlsProperties; + public static void dataflowProfileDelete(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflowProfiles() + .delete("rgiotoperations", "resource-name123", "resource-name123", com.azure.core.util.Context.NONE); + } +} +``` +### Dataflow_Get + +```java /** - * Samples for DataflowEndpoint CreateOrUpdate. + * Samples for BrokerAuthorization Delete. */ -public final class DataflowEndpointCreateOrUpdateSamples { +public final class BrokerAuthorizationDeleteSamples { /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json + * x-ms-original-file: 2025-04-01/BrokerAuthorization_Delete_MaximumSet_Gen.json */ /** - * Sample code: DataflowEndpoint_CreateOrUpdate_EventGrid. + * Sample code: BrokerAuthorization_Delete. * * @param manager Entry point to IoTOperationsManager. */ - public static void - dataflowEndpointCreateOrUpdateEventGrid(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowEndpoints() - .define("event-grid-endpoint") - .withExistingInstance("rgiotoperations", "resource-name123") - .withExtendedLocation( - new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.MQTT) - .withMqttSettings(new DataflowEndpointMqtt() - .withAuthentication(new DataflowEndpointMqttAuthentication() - .withMethod(MqttAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) - .withSystemAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationSystemAssignedManagedIdentity())) - .withHost("example.westeurope-1.ts.eventgrid.azure.net:8883") - .withTls(new TlsProperties().withMode(OperationalMode.ENABLED)))) - .create(); + public static void brokerAuthorizationDelete(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerAuthorizations() + .delete("rgiotoperations", "resource-name123", "resource-name123", "resource-name123", + com.azure.core.util.Context.NONE); } +} +``` + +### Dataflow_ListByResourceGroup +```java +/** + * Samples for Dataflow Get. + */ +public final class DataflowGetSamples { /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json + * x-ms-original-file: 2025-04-01/Dataflow_Get_MaximumSet_Gen.json */ /** - * Sample code: DataflowEndpoint_CreateOrUpdate_ADLSv2. + * Sample code: Dataflow_Get. * * @param manager Entry point to IoTOperationsManager. */ - public static void - dataflowEndpointCreateOrUpdateADLSv2(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowEndpoints() - .define("adlsv2-endpoint") - .withExistingInstance("rgiotoperations", "resource-name123") - .withExtendedLocation( - new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.DATA_LAKE_STORAGE) - .withDataLakeStorageSettings( - new DataflowEndpointDataLakeStorage() - .withAuthentication( - new DataflowEndpointDataLakeStorageAuthentication() - .withMethod(DataLakeStorageAuthMethod.ACCESS_TOKEN) - .withAccessTokenSettings(new DataflowEndpointAuthenticationAccessToken() - .withSecretRef("fakeTokenPlaceholder"))) - .withHost("example.blob.core.windows.net"))) - .create(); + public static void dataflowGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.dataflows() + .getWithResponse("rgiotoperations", "resource-name123", "resource-name123", "resource-name123", + com.azure.core.util.Context.NONE); } +} +``` + +### DataflowEndpoint_CreateOrUpdate +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventHub.json + * x-ms-original-file: 2025-04-01/Operations_List_MaximumSet_Gen.json */ /** - * Sample code: DataflowEndpoint_CreateOrUpdate_EventHub. + * Sample code: Operations_List. * * @param manager Entry point to IoTOperationsManager. */ - public static void - dataflowEndpointCreateOrUpdateEventHub(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowEndpoints() - .define("event-hub-endpoint") - .withExistingInstance("rgiotoperations", "resource-name123") - .withExtendedLocation( - new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.KAFKA) - .withKafkaSettings(new DataflowEndpointKafka() - .withAuthentication(new DataflowEndpointKafkaAuthentication() - .withMethod(KafkaAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) - .withSystemAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationSystemAssignedManagedIdentity())) - .withConsumerGroupId("aiodataflows") - .withHost("example.servicebus.windows.net:9093") - .withTls(new TlsProperties().withMode(OperationalMode.ENABLED)))) - .create(); + public static void operationsList(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } +} +``` + +### DataflowEndpoint_Delete +```java +/** + * Samples for Broker Get. + */ +public final class BrokerGetSamples { /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/Broker_Get_MaximumSet_Gen.json */ /** - * Sample code: DataflowEndpoint_CreateOrUpdate. + * Sample code: Broker_Get. + * + * @param manager Entry point to IoTOperationsManager. + */ + public static void brokerGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokers() + .getWithResponse("rgiotoperations", "resource-name123", "resource-name123", + com.azure.core.util.Context.NONE); + } +} +``` + +### DataflowEndpoint_Get + +```java +import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticationMethod; +import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticationProperties; +import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticatorCustomAuth; +import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticatorMethodCustom; +import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticatorMethodSat; +import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticatorMethodX509; +import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticatorMethodX509Attributes; +import com.azure.resourcemanager.iotoperations.models.BrokerAuthenticatorMethods; +import com.azure.resourcemanager.iotoperations.models.ExtendedLocation; +import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType; +import com.azure.resourcemanager.iotoperations.models.X509ManualCertificate; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for BrokerAuthentication CreateOrUpdate. + */ +public final class BrokerAuthenticationCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-04-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: BrokerAuthentication_CreateOrUpdate. * * @param manager Entry point to IoTOperationsManager. */ public static void - dataflowEndpointCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowEndpoints() - .define("resource-name123") - .withExistingInstance("rgiotoperations", "resource-name123") - .withExtendedLocation( - new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties( - new DataflowEndpointProperties().withEndpointType(EndpointType.DATA_EXPLORER) - .withDataExplorerSettings( - new DataflowEndpointDataExplorer() - .withAuthentication( - new DataflowEndpointDataExplorerAuthentication() - .withMethod(DataExplorerAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) - .withSystemAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationSystemAssignedManagedIdentity() - .withAudience("psxomrfbhoflycm")) - .withUserAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationUserAssignedManagedIdentity() - .withClientId("fb90f267-8872-431a-a76a-a1cec5d3c4d2") - .withScope("zop") - .withTenantId("ed060aa2-71ff-4d3f-99c4-a9138356fdec"))) - .withDatabase("yqcdpjsifm") - .withHost("..kusto.windows.net") - .withBatching(new BatchingConfiguration().withLatencySeconds(9312).withMaxMessages(9028))) - .withDataLakeStorageSettings( - new DataflowEndpointDataLakeStorage() - .withAuthentication(new DataflowEndpointDataLakeStorageAuthentication() - .withMethod(DataLakeStorageAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) - .withAccessTokenSettings(new DataflowEndpointAuthenticationAccessToken() - .withSecretRef("fakeTokenPlaceholder")) - .withSystemAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationSystemAssignedManagedIdentity() - .withAudience("psxomrfbhoflycm")) - .withUserAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationUserAssignedManagedIdentity() - .withClientId("fb90f267-8872-431a-a76a-a1cec5d3c4d2") - .withScope("zop") - .withTenantId("ed060aa2-71ff-4d3f-99c4-a9138356fdec"))) - .withHost(".blob.core.windows.net") - .withBatching(new BatchingConfiguration().withLatencySeconds(9312).withMaxMessages(9028))) - .withFabricOneLakeSettings(new DataflowEndpointFabricOneLake() - .withAuthentication(new DataflowEndpointFabricOneLakeAuthentication() - .withMethod(FabricOneLakeAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) - .withSystemAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationSystemAssignedManagedIdentity() - .withAudience("psxomrfbhoflycm")) - .withUserAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationUserAssignedManagedIdentity() - .withClientId("fb90f267-8872-431a-a76a-a1cec5d3c4d2") - .withScope("zop") - .withTenantId("ed060aa2-71ff-4d3f-99c4-a9138356fdec"))) - .withNames(new DataflowEndpointFabricOneLakeNames().withLakehouseName("wpeathi") - .withWorkspaceName("nwgmitkbljztgms")) - .withOneLakePathType(DataflowEndpointFabricPathType.FILES) - .withHost("https://.fabric.microsoft.com") - .withBatching(new BatchingConfiguration().withLatencySeconds(9312).withMaxMessages(9028))) - .withKafkaSettings(new DataflowEndpointKafka() - .withAuthentication(new DataflowEndpointKafkaAuthentication() - .withMethod(KafkaAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) - .withSystemAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationSystemAssignedManagedIdentity() - .withAudience("psxomrfbhoflycm")) - .withUserAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationUserAssignedManagedIdentity() - .withClientId("fb90f267-8872-431a-a76a-a1cec5d3c4d2") - .withScope("zop") - .withTenantId("ed060aa2-71ff-4d3f-99c4-a9138356fdec")) - .withSaslSettings(new DataflowEndpointAuthenticationSasl() - .withSaslType(DataflowEndpointAuthenticationSaslType.PLAIN) - .withSecretRef("fakeTokenPlaceholder")) - .withX509CertificateSettings( - new DataflowEndpointAuthenticationX509().withSecretRef("fakeTokenPlaceholder"))) - .withConsumerGroupId("ukkzcjiyenhxokat") - .withHost("pwcqfiqclcgneolpewnyavoulbip") - .withBatching(new DataflowEndpointKafkaBatching().withMode(OperationalMode.ENABLED) - .withLatencyMs(3679) - .withMaxBytes(8887) - .withMaxMessages(2174)) - .withCopyMqttProperties(OperationalMode.ENABLED) - .withCompression(DataflowEndpointKafkaCompression.NONE) - .withKafkaAcks(DataflowEndpointKafkaAcks.ZERO) - .withPartitionStrategy(DataflowEndpointKafkaPartitionStrategy.DEFAULT) - .withTls(new TlsProperties().withMode(OperationalMode.ENABLED) - .withTrustedCaCertificateConfigMapRef("tectjjvukvelsreihwadh")) - .withCloudEventAttributes(CloudEventAttributeType.fromString("PassThrough"))) - .withLocalStorageSettings( - new DataflowEndpointLocalStorage().withPersistentVolumeClaimRef("jjwqwvd")) - .withMqttSettings(new DataflowEndpointMqtt() - .withAuthentication(new DataflowEndpointMqttAuthentication() - .withMethod(MqttAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) - .withSystemAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationSystemAssignedManagedIdentity() - .withAudience("psxomrfbhoflycm")) - .withUserAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationUserAssignedManagedIdentity() - .withClientId("fb90f267-8872-431a-a76a-a1cec5d3c4d2") - .withScope("zop") - .withTenantId("ed060aa2-71ff-4d3f-99c4-a9138356fdec")) - .withServiceAccountTokenSettings(new DataflowEndpointAuthenticationServiceAccountToken() - .withAudience("ejbklrbxgjaqleoycgpje")) - .withX509CertificateSettings( - new DataflowEndpointAuthenticationX509().withSecretRef("fakeTokenPlaceholder"))) - .withClientIdPrefix("kkljsdxdirfhwxtkavldekeqhv") - .withHost("nyhnxqnbspstctl") - .withProtocol(BrokerProtocolType.MQTT) - .withKeepAliveSeconds(0) - .withRetain(MqttRetainType.KEEP) - .withMaxInflightMessages(0) - .withQos(1) - .withSessionExpirySeconds(0) - .withTls(new TlsProperties().withMode(OperationalMode.ENABLED) - .withTrustedCaCertificateConfigMapRef("tectjjvukvelsreihwadh")) - .withCloudEventAttributes(CloudEventAttributeType.fromString("PassThrough")))) + brokerAuthenticationCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerAuthentications() + .define("resource-name123") + .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") + .withExtendedLocation( + new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withProperties( + new BrokerAuthenticationProperties() + .withAuthenticationMethods( + Arrays + .asList(new BrokerAuthenticatorMethods().withMethod(BrokerAuthenticationMethod.CUSTOM) + .withCustomSettings(new BrokerAuthenticatorMethodCustom() + .withAuth(new BrokerAuthenticatorCustomAuth() + .withX509(new X509ManualCertificate().withSecretRef("fakeTokenPlaceholder"))) + .withCaCertConfigMap("pdecudefqyolvncbus") + .withEndpoint("https://www.example.com") + .withHeaders(mapOf("key8518", "fakeTokenPlaceholder"))) + .withServiceAccountTokenSettings( + new BrokerAuthenticatorMethodSat().withAudiences(Arrays.asList("jqyhyqatuydg"))) + .withX509Settings(new BrokerAuthenticatorMethodX509() + .withAuthorizationAttributes(mapOf("key3384", + new BrokerAuthenticatorMethodX509Attributes() + .withAttributes(mapOf("key186", "fakeTokenPlaceholder")) + .withSubject("jpgwctfeixitptfgfnqhua"))) + .withTrustedClientCaCert("vlctsqddl"))))) .create(); } /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADX.json + * x-ms-original-file: 2025-04-01/BrokerAuthentication_CreateOrUpdate_Complex.json */ /** - * Sample code: DataflowEndpoint_CreateOrUpdate_ADX. + * Sample code: BrokerAuthentication_CreateOrUpdate_Complex. * * @param manager Entry point to IoTOperationsManager. */ - public static void - dataflowEndpointCreateOrUpdateADX(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowEndpoints() - .define("adx-endpoint") - .withExistingInstance("rgiotoperations", "resource-name123") + public static void brokerAuthenticationCreateOrUpdateComplex( + com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerAuthentications() + .define("resource-name123") + .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.DATA_EXPLORER) - .withDataExplorerSettings(new DataflowEndpointDataExplorer() - .withAuthentication(new DataflowEndpointDataExplorerAuthentication() - .withMethod(DataExplorerAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) - .withSystemAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationSystemAssignedManagedIdentity())) - .withDatabase("example-database") - .withHost("example.westeurope.kusto.windows.net") - .withBatching(new BatchingConfiguration().withLatencySeconds(9312).withMaxMessages(9028)))) + .withProperties(new BrokerAuthenticationProperties().withAuthenticationMethods(Arrays.asList( + new BrokerAuthenticatorMethods().withMethod(BrokerAuthenticationMethod.SERVICE_ACCOUNT_TOKEN) + .withServiceAccountTokenSettings( + new BrokerAuthenticatorMethodSat().withAudiences(Arrays.asList("aio-internal"))), + new BrokerAuthenticatorMethods().withMethod(BrokerAuthenticationMethod.X509) + .withX509Settings(new BrokerAuthenticatorMethodX509().withAuthorizationAttributes(mapOf("root", + new BrokerAuthenticatorMethodX509Attributes().withAttributes(mapOf("organization", "contoso")) + .withSubject("CN = Contoso Root CA Cert, OU = Engineering, C = US"), + "intermediate", + new BrokerAuthenticatorMethodX509Attributes() + .withAttributes(mapOf("city", "seattle", "foo", "bar")) + .withSubject("CN = Contoso Intermediate CA"), + "smart-fan", + new BrokerAuthenticatorMethodX509Attributes().withAttributes(mapOf("building", "17")) + .withSubject("CN = smart-fan"))) + .withTrustedClientCaCert("my-ca"))))) .create(); } + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### DataflowEndpoint_ListByResourceGroup + +```java +/** + * Samples for Instance Delete. + */ +public final class InstanceDeleteSamples { /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Fabric.json + * x-ms-original-file: 2025-04-01/Instance_Delete_MaximumSet_Gen.json */ /** - * Sample code: DataflowEndpoint_CreateOrUpdate_Fabric. + * Sample code: Instance_Delete. + * + * @param manager Entry point to IoTOperationsManager. + */ + public static void instanceDelete(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.instances().delete("rgiotoperations", "aio-instance", com.azure.core.util.Context.NONE); + } +} +``` + +### DataflowProfile_CreateOrUpdate + +```java +/** + * Samples for Instance ListByResourceGroup. + */ +public final class InstanceListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-04-01/Instance_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: Instance_ListByResourceGroup. * * @param manager Entry point to IoTOperationsManager. */ public static void - dataflowEndpointCreateOrUpdateFabric(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowEndpoints() - .define("fabric-endpoint") + instanceListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.instances().listByResourceGroup("rgiotoperations", com.azure.core.util.Context.NONE); + } +} +``` + +### DataflowProfile_Delete + +```java +import com.azure.resourcemanager.iotoperations.models.AdvancedSettings; +import com.azure.resourcemanager.iotoperations.models.BackendChain; +import com.azure.resourcemanager.iotoperations.models.BrokerDiagnostics; +import com.azure.resourcemanager.iotoperations.models.BrokerMemoryProfile; +import com.azure.resourcemanager.iotoperations.models.BrokerProperties; +import com.azure.resourcemanager.iotoperations.models.Cardinality; +import com.azure.resourcemanager.iotoperations.models.CertManagerCertOptions; +import com.azure.resourcemanager.iotoperations.models.CertManagerPrivateKey; +import com.azure.resourcemanager.iotoperations.models.ClientConfig; +import com.azure.resourcemanager.iotoperations.models.DiagnosticsLogs; +import com.azure.resourcemanager.iotoperations.models.DiskBackedMessageBuffer; +import com.azure.resourcemanager.iotoperations.models.ExtendedLocation; +import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType; +import com.azure.resourcemanager.iotoperations.models.Frontend; +import com.azure.resourcemanager.iotoperations.models.GenerateResourceLimits; +import com.azure.resourcemanager.iotoperations.models.KubernetesReference; +import com.azure.resourcemanager.iotoperations.models.LocalKubernetesReference; +import com.azure.resourcemanager.iotoperations.models.Metrics; +import com.azure.resourcemanager.iotoperations.models.OperationalMode; +import com.azure.resourcemanager.iotoperations.models.OperatorValues; +import com.azure.resourcemanager.iotoperations.models.PrivateKeyAlgorithm; +import com.azure.resourcemanager.iotoperations.models.PrivateKeyRotationPolicy; +import com.azure.resourcemanager.iotoperations.models.SelfCheck; +import com.azure.resourcemanager.iotoperations.models.SelfTracing; +import com.azure.resourcemanager.iotoperations.models.SubscriberMessageDropStrategy; +import com.azure.resourcemanager.iotoperations.models.SubscriberQueueLimit; +import com.azure.resourcemanager.iotoperations.models.Traces; +import com.azure.resourcemanager.iotoperations.models.VolumeClaimResourceRequirements; +import com.azure.resourcemanager.iotoperations.models.VolumeClaimSpec; +import com.azure.resourcemanager.iotoperations.models.VolumeClaimSpecSelector; +import com.azure.resourcemanager.iotoperations.models.VolumeClaimSpecSelectorMatchExpressions; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Broker CreateOrUpdate. + */ +public final class BrokerCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-04-01/Broker_CreateOrUpdate_Minimal.json + */ + /** + * Sample code: Broker_CreateOrUpdate_Minimal. + * + * @param manager Entry point to IoTOperationsManager. + */ + public static void + brokerCreateOrUpdateMinimal(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokers() + .define("resource-name123") .withExistingInstance("rgiotoperations", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.FABRIC_ONE_LAKE) - .withFabricOneLakeSettings(new DataflowEndpointFabricOneLake() - .withAuthentication(new DataflowEndpointFabricOneLakeAuthentication() - .withMethod(FabricOneLakeAuthMethod.SYSTEM_ASSIGNED_MANAGED_IDENTITY) - .withSystemAssignedManagedIdentitySettings( - new DataflowEndpointAuthenticationSystemAssignedManagedIdentity())) - .withNames(new DataflowEndpointFabricOneLakeNames().withLakehouseName("example-lakehouse") - .withWorkspaceName("example-workspace")) - .withOneLakePathType(DataflowEndpointFabricPathType.TABLES) - .withHost("onelake.dfs.fabric.microsoft.com"))) + .withProperties(new BrokerProperties().withMemoryProfile(BrokerMemoryProfile.TINY)) .create(); } /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json + * x-ms-original-file: 2025-04-01/Broker_CreateOrUpdate_Complex.json */ /** - * Sample code: DataflowEndpoint_CreateOrUpdate_LocalStorage. + * Sample code: Broker_CreateOrUpdate_Complex. * * @param manager Entry point to IoTOperationsManager. */ - public static void dataflowEndpointCreateOrUpdateLocalStorage( - com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowEndpoints() - .define("local-storage-endpoint") + public static void + brokerCreateOrUpdateComplex(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokers() + .define("resource-name123") .withExistingInstance("rgiotoperations", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.LOCAL_STORAGE) - .withLocalStorageSettings( - new DataflowEndpointLocalStorage().withPersistentVolumeClaimRef("example-pvc"))) + .withProperties(new BrokerProperties() + .withCardinality(new Cardinality() + .withBackendChain(new BackendChain().withPartitions(2).withRedundancyFactor(2).withWorkers(2)) + .withFrontend(new Frontend().withReplicas(2).withWorkers(2))) + .withDiskBackedMessageBuffer(new DiskBackedMessageBuffer().withMaxSize("50M")) + .withGenerateResourceLimits(new GenerateResourceLimits().withCpu(OperationalMode.ENABLED)) + .withMemoryProfile(BrokerMemoryProfile.MEDIUM)) .create(); } /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_AIO.json + * x-ms-original-file: 2025-04-01/Broker_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: DataflowEndpoint_CreateOrUpdate_AIO. + * Sample code: Broker_CreateOrUpdate. * * @param manager Entry point to IoTOperationsManager. */ - public static void - dataflowEndpointCreateOrUpdateAIO(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowEndpoints() - .define("aio-builtin-broker-endpoint") + public static void brokerCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokers() + .define("resource-name123") .withExistingInstance("rgiotoperations", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) .withProperties( - new DataflowEndpointProperties().withEndpointType(EndpointType.MQTT) - .withMqttSettings(new DataflowEndpointMqtt() - .withAuthentication( - new DataflowEndpointMqttAuthentication().withMethod(MqttAuthMethod.fromString("Kubernetes")) - .withServiceAccountTokenSettings(new DataflowEndpointAuthenticationServiceAccountToken() - .withAudience("aio-internal"))) - .withHost("aio-broker:18883") - .withTls(new TlsProperties().withMode(OperationalMode.ENABLED) - .withTrustedCaCertificateConfigMapRef("aio-ca-trust-bundle-test-only")))) + new BrokerProperties() + .withAdvanced(new AdvancedSettings() + .withClients(new ClientConfig().withMaxSessionExpirySeconds(3859) + .withMaxMessageExpirySeconds(3263) + .withMaxPacketSizeBytes(3029) + .withSubscriberQueueLimit(new SubscriberQueueLimit().withLength(6L) + .withStrategy(SubscriberMessageDropStrategy.NONE)) + .withMaxReceiveMaximum(2365) + .withMaxKeepAliveSeconds(3744)) + .withEncryptInternalTraffic(OperationalMode.ENABLED) + .withInternalCerts(new CertManagerCertOptions().withDuration("bchrc") + .withRenewBefore("xkafmpgjfifkwwrhkswtopdnne") + .withPrivateKey(new CertManagerPrivateKey().withAlgorithm(PrivateKeyAlgorithm.EC256) + .withRotationPolicy(PrivateKeyRotationPolicy.ALWAYS)))) + .withCardinality(new Cardinality() + .withBackendChain(new BackendChain().withPartitions(11).withRedundancyFactor(5).withWorkers(15)) + .withFrontend(new Frontend().withReplicas(2).withWorkers(6))) + .withDiagnostics(new BrokerDiagnostics() + .withLogs(new DiagnosticsLogs().withLevel("rnmwokumdmebpmfxxxzvvjfdywotav")) + .withMetrics(new Metrics().withPrometheusPort(7581)) + .withSelfCheck(new SelfCheck().withMode(OperationalMode.ENABLED) + .withIntervalSeconds(158) + .withTimeoutSeconds(14)) + .withTraces(new Traces().withMode(OperationalMode.ENABLED) + .withCacheSizeMegabytes(28) + .withSelfTracing( + new SelfTracing().withMode(OperationalMode.ENABLED).withIntervalSeconds(22)) + .withSpanChannelCapacity(1000))) + .withDiskBackedMessageBuffer(new DiskBackedMessageBuffer().withMaxSize("500M") + .withEphemeralVolumeClaimSpec(new VolumeClaimSpec().withVolumeName("c") + .withVolumeMode("rxvpksjuuugqnqzeiprocknbn") + .withStorageClassName("sseyhrjptkhrqvpdpjmornkqvon") + .withAccessModes(Arrays.asList("nuluhigrbb")) + .withDataSource(new LocalKubernetesReference().withApiGroup("npqapyksvvpkohujx") + .withKind("wazgyb") + .withName("cwhsgxxcxsyppoefm")) + .withDataSourceRef(new KubernetesReference().withApiGroup("mnfnykznjjsoqpfsgdqioupt") + .withKind("odynqzekfzsnawrctaxg") + .withName("envszivbbmixbyddzg") + .withNamespace("etcfzvxqd")) + .withResources(new VolumeClaimResourceRequirements() + .withLimits(mapOf("key2719", "fakeTokenPlaceholder")) + .withRequests(mapOf("key2909", "fakeTokenPlaceholder"))) + .withSelector(new VolumeClaimSpecSelector() + .withMatchExpressions(Arrays.asList( + new VolumeClaimSpecSelectorMatchExpressions().withKey("fakeTokenPlaceholder") + .withOperator(OperatorValues.IN) + .withValues(Arrays.asList("slmpajlywqvuyknipgztsonqyybt")))) + .withMatchLabels(mapOf("key6673", "fakeTokenPlaceholder")))) + .withPersistentVolumeClaimSpec(new VolumeClaimSpec().withVolumeName("c") + .withVolumeMode("rxvpksjuuugqnqzeiprocknbn") + .withStorageClassName("sseyhrjptkhrqvpdpjmornkqvon") + .withAccessModes(Arrays.asList("nuluhigrbb")) + .withDataSource(new LocalKubernetesReference().withApiGroup("npqapyksvvpkohujx") + .withKind("wazgyb") + .withName("cwhsgxxcxsyppoefm")) + .withDataSourceRef(new KubernetesReference().withApiGroup("mnfnykznjjsoqpfsgdqioupt") + .withKind("odynqzekfzsnawrctaxg") + .withName("envszivbbmixbyddzg") + .withNamespace("etcfzvxqd")) + .withResources(new VolumeClaimResourceRequirements() + .withLimits(mapOf("key2719", "fakeTokenPlaceholder")) + .withRequests(mapOf("key2909", "fakeTokenPlaceholder"))) + .withSelector(new VolumeClaimSpecSelector() + .withMatchExpressions(Arrays.asList( + new VolumeClaimSpecSelectorMatchExpressions().withKey("fakeTokenPlaceholder") + .withOperator(OperatorValues.IN) + .withValues(Arrays.asList("slmpajlywqvuyknipgztsonqyybt")))) + .withMatchLabels(mapOf("key6673", "fakeTokenPlaceholder"))))) + .withGenerateResourceLimits(new GenerateResourceLimits().withCpu(OperationalMode.ENABLED)) + .withMemoryProfile(BrokerMemoryProfile.TINY)) .create(); } /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MQTT.json + * x-ms-original-file: 2025-04-01/Broker_CreateOrUpdate_Simple.json */ /** - * Sample code: DataflowEndpoint_CreateOrUpdate_MQTT. + * Sample code: Broker_CreateOrUpdate_Simple. * * @param manager Entry point to IoTOperationsManager. */ public static void - dataflowEndpointCreateOrUpdateMQTT(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowEndpoints() - .define("generic-mqtt-broker-endpoint") + brokerCreateOrUpdateSimple(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokers() + .define("resource-name123") .withExistingInstance("rgiotoperations", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.MQTT) - .withMqttSettings(new DataflowEndpointMqtt() - .withAuthentication( - new DataflowEndpointMqttAuthentication().withMethod(MqttAuthMethod.X509CERTIFICATE) - .withX509CertificateSettings( - new DataflowEndpointAuthenticationX509().withSecretRef("fakeTokenPlaceholder"))) - .withClientIdPrefix("factory-gateway") - .withHost("example.broker.local:1883") - .withProtocol(BrokerProtocolType.WEB_SOCKETS) - .withKeepAliveSeconds(60) - .withRetain(MqttRetainType.KEEP) - .withMaxInflightMessages(100) - .withQos(1) - .withSessionExpirySeconds(3600) - .withTls(new TlsProperties().withMode(OperationalMode.DISABLED)))) + .withProperties(new BrokerProperties() + .withCardinality(new Cardinality() + .withBackendChain(new BackendChain().withPartitions(2).withRedundancyFactor(2).withWorkers(2)) + .withFrontend(new Frontend().withReplicas(2).withWorkers(2))) + .withGenerateResourceLimits(new GenerateResourceLimits().withCpu(OperationalMode.ENABLED)) + .withMemoryProfile(BrokerMemoryProfile.LOW)) .create(); } - /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Kafka.json - */ - /** - * Sample code: DataflowEndpoint_CreateOrUpdate_Kafka. - * - * @param manager Entry point to IoTOperationsManager. - */ - public static void - dataflowEndpointCreateOrUpdateKafka(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowEndpoints() - .define("generic-kafka-endpoint") - .withExistingInstance("rgiotoperations", "resource-name123") - .withExtendedLocation( - new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new DataflowEndpointProperties().withEndpointType(EndpointType.KAFKA) - .withKafkaSettings(new DataflowEndpointKafka() - .withAuthentication(new DataflowEndpointKafkaAuthentication().withMethod(KafkaAuthMethod.SASL) - .withSaslSettings(new DataflowEndpointAuthenticationSasl() - .withSaslType(DataflowEndpointAuthenticationSaslType.PLAIN) - .withSecretRef("fakeTokenPlaceholder"))) - .withConsumerGroupId("dataflows") - .withHost("example.kafka.local:9093") - .withBatching(new DataflowEndpointKafkaBatching().withMode(OperationalMode.ENABLED) - .withLatencyMs(5) - .withMaxBytes(1000000) - .withMaxMessages(100000)) - .withCopyMqttProperties(OperationalMode.ENABLED) - .withCompression(DataflowEndpointKafkaCompression.GZIP) - .withKafkaAcks(DataflowEndpointKafkaAcks.ALL) - .withPartitionStrategy(DataflowEndpointKafkaPartitionStrategy.DEFAULT) - .withTls(new TlsProperties().withMode(OperationalMode.ENABLED) - .withTrustedCaCertificateConfigMapRef("ca-certificates")) - .withCloudEventAttributes(CloudEventAttributeType.PROPAGATE))) - .create(); + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### DataflowEndpoint_Delete +### DataflowProfile_Get ```java /** @@ -1723,7 +1722,7 @@ public final class DataflowEndpointCreateOrUpdateSamples { */ public final class DataflowEndpointDeleteSamples { /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/DataflowEndpoint_Delete_MaximumSet_Gen.json */ /** * Sample code: DataflowEndpoint_Delete. @@ -1737,151 +1736,172 @@ public final class DataflowEndpointDeleteSamples { } ``` -### DataflowEndpoint_Get +### DataflowProfile_ListByResourceGroup ```java /** - * Samples for DataflowEndpoint Get. + * Samples for Instance List. */ -public final class DataflowEndpointGetSamples { +public final class InstanceListSamples { /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/Instance_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: DataflowEndpoint_Get. + * Sample code: Instance_ListBySubscription. * * @param manager Entry point to IoTOperationsManager. */ - public static void dataflowEndpointGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowEndpoints() - .getWithResponse("rgiotoperations", "resource-name123", "resource-name123", - com.azure.core.util.Context.NONE); + public static void + instanceListBySubscription(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.instances().list(com.azure.core.util.Context.NONE); } } ``` -### DataflowEndpoint_ListByResourceGroup +### Instance_CreateOrUpdate ```java /** - * Samples for DataflowEndpoint ListByResourceGroup. + * Samples for BrokerListener Get. */ -public final class DataflowEndpointListByResourceGroupSamples { +public final class BrokerListenerGetSamples { /* - * x-ms-original-file: 2024-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/BrokerListener_Get_MaximumSet_Gen.json */ /** - * Sample code: DataflowEndpoint_ListByResourceGroup. + * Sample code: BrokerListener_Get. * * @param manager Entry point to IoTOperationsManager. */ - public static void - dataflowEndpointListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowEndpoints() - .listByResourceGroup("rgiotoperations", "resource-name123", com.azure.core.util.Context.NONE); + public static void brokerListenerGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerListeners() + .getWithResponse("rgiotoperations", "resource-name123", "resource-name123", "resource-name123", + com.azure.core.util.Context.NONE); } } ``` -### DataflowProfile_CreateOrUpdate +### Instance_Delete ```java -import com.azure.resourcemanager.iotoperations.models.DataflowProfileProperties; -import com.azure.resourcemanager.iotoperations.models.DiagnosticsLogs; +import com.azure.resourcemanager.iotoperations.models.BrokerListenerProperties; +import com.azure.resourcemanager.iotoperations.models.BrokerProtocolType; +import com.azure.resourcemanager.iotoperations.models.CertManagerCertificateSpec; +import com.azure.resourcemanager.iotoperations.models.CertManagerIssuerKind; +import com.azure.resourcemanager.iotoperations.models.CertManagerIssuerRef; +import com.azure.resourcemanager.iotoperations.models.CertManagerPrivateKey; import com.azure.resourcemanager.iotoperations.models.ExtendedLocation; import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType; -import com.azure.resourcemanager.iotoperations.models.Metrics; -import com.azure.resourcemanager.iotoperations.models.ProfileDiagnostics; +import com.azure.resourcemanager.iotoperations.models.ListenerPort; +import com.azure.resourcemanager.iotoperations.models.PrivateKeyAlgorithm; +import com.azure.resourcemanager.iotoperations.models.PrivateKeyRotationPolicy; +import com.azure.resourcemanager.iotoperations.models.SanForCert; +import com.azure.resourcemanager.iotoperations.models.ServiceType; +import com.azure.resourcemanager.iotoperations.models.TlsCertMethod; +import com.azure.resourcemanager.iotoperations.models.TlsCertMethodMode; +import com.azure.resourcemanager.iotoperations.models.X509ManualCertificate; +import java.util.Arrays; /** - * Samples for DataflowProfile CreateOrUpdate. + * Samples for BrokerListener CreateOrUpdate. */ -public final class DataflowProfileCreateOrUpdateSamples { +public final class BrokerListenerCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: DataflowProfile_CreateOrUpdate. + * Sample code: BrokerListener_CreateOrUpdate. * * @param manager Entry point to IoTOperationsManager. */ public static void - dataflowProfileCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowProfiles() + brokerListenerCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerListeners() .define("resource-name123") - .withExistingInstance("rgiotoperations", "resource-name123") + .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new DataflowProfileProperties().withDiagnostics( - new ProfileDiagnostics().withLogs(new DiagnosticsLogs().withLevel("rnmwokumdmebpmfxxxzvvjfdywotav")) - .withMetrics(new Metrics().withPrometheusPort(7581))) - .withInstanceCount(14)) + .withProperties(new BrokerListenerProperties().withServiceName("tpfiszlapdpxktx") + .withPorts(Arrays.asList(new ListenerPort().withAuthenticationRef("tjvdroaqqy") + .withAuthorizationRef("fakeTokenPlaceholder") + .withNodePort(7281) + .withPort(1268) + .withProtocol(BrokerProtocolType.MQTT) + .withTls(new TlsCertMethod().withMode(TlsCertMethodMode.AUTOMATIC) + .withCertManagerCertificateSpec(new CertManagerCertificateSpec().withDuration("qmpeffoksron") + .withSecretName("fakeTokenPlaceholder") + .withRenewBefore("hutno") + .withIssuerRef(new CertManagerIssuerRef().withGroup("jtmuladdkpasfpoyvewekmiy") + .withKind(CertManagerIssuerKind.ISSUER) + .withName("ocwoqpgucvjrsuudtjhb")) + .withPrivateKey(new CertManagerPrivateKey().withAlgorithm(PrivateKeyAlgorithm.EC256) + .withRotationPolicy(PrivateKeyRotationPolicy.ALWAYS)) + .withSan(new SanForCert().withDns(Arrays.asList("xhvmhrrhgfsapocjeebqtnzarlj")) + .withIp(Arrays.asList("zbgugfzcgsmegevzktsnibyuyp")))) + .withManual(new X509ManualCertificate().withSecretRef("fakeTokenPlaceholder"))))) + .withServiceType(ServiceType.CLUSTER_IP)) .create(); } /* - * x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_Minimal.json + * x-ms-original-file: 2025-04-01/BrokerListener_CreateOrUpdate_Simple.json */ /** - * Sample code: DataflowProfile_CreateOrUpdate_Minimal. + * Sample code: BrokerListener_CreateOrUpdate_Simple. * * @param manager Entry point to IoTOperationsManager. */ public static void - dataflowProfileCreateOrUpdateMinimal(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowProfiles() - .define("aio-dataflowprofile") - .withExistingInstance("rgiotoperations", "resource-name123") + brokerListenerCreateOrUpdateSimple(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerListeners() + .define("resource-name123") + .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new DataflowProfileProperties().withInstanceCount(1)) + .withProperties(new BrokerListenerProperties().withPorts(Arrays.asList(new ListenerPort().withPort(1883)))) .create(); } /* - * x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_Multi.json + * x-ms-original-file: 2025-04-01/BrokerListener_CreateOrUpdate_Complex.json */ /** - * Sample code: DataflowProfile_CreateOrUpdate_Multi. + * Sample code: BrokerListener_CreateOrUpdate_Complex. * * @param manager Entry point to IoTOperationsManager. */ public static void - dataflowProfileCreateOrUpdateMulti(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowProfiles() - .define("aio-dataflowprofile") - .withExistingInstance("rgiotoperations", "resource-name123") + brokerListenerCreateOrUpdateComplex(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerListeners() + .define("resource-name123") + .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") .withExtendedLocation( new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withProperties(new DataflowProfileProperties().withInstanceCount(3)) + .withProperties(new BrokerListenerProperties() + .withPorts(Arrays.asList( + new ListenerPort().withAuthenticationRef("example-authentication") + .withPort(8080) + .withProtocol(BrokerProtocolType.WEB_SOCKETS), + new ListenerPort().withAuthenticationRef("example-authentication") + .withPort(8443) + .withProtocol(BrokerProtocolType.WEB_SOCKETS) + .withTls(new TlsCertMethod().withMode(TlsCertMethodMode.AUTOMATIC) + .withCertManagerCertificateSpec(new CertManagerCertificateSpec() + .withIssuerRef(new CertManagerIssuerRef().withGroup("jtmuladdkpasfpoyvewekmiy") + .withKind(CertManagerIssuerKind.ISSUER) + .withName("example-issuer")))), + new ListenerPort().withAuthenticationRef("example-authentication").withPort(1883), + new ListenerPort().withAuthenticationRef("example-authentication") + .withPort(8883) + .withTls(new TlsCertMethod().withMode(TlsCertMethodMode.MANUAL) + .withManual(new X509ManualCertificate().withSecretRef("fakeTokenPlaceholder"))))) + .withServiceType(ServiceType.LOAD_BALANCER)) .create(); } } ``` -### DataflowProfile_Delete - -```java -/** - * Samples for DataflowProfile Delete. - */ -public final class DataflowProfileDeleteSamples { - /* - * x-ms-original-file: 2024-11-01/DataflowProfile_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: DataflowProfile_Delete. - * - * @param manager Entry point to IoTOperationsManager. - */ - public static void dataflowProfileDelete(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowProfiles() - .delete("rgiotoperations", "resource-name123", "resource-name123", com.azure.core.util.Context.NONE); - } -} -``` - -### DataflowProfile_Get +### Instance_GetByResourceGroup ```java /** @@ -1889,7 +1909,7 @@ public final class DataflowProfileDeleteSamples { */ public final class DataflowProfileGetSamples { /* - * x-ms-original-file: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/DataflowProfile_Get_MaximumSet_Gen.json */ /** * Sample code: DataflowProfile_Get. @@ -1904,200 +1924,201 @@ public final class DataflowProfileGetSamples { } ``` -### DataflowProfile_ListByResourceGroup +### Instance_List ```java /** - * Samples for DataflowProfile ListByResourceGroup. + * Samples for Broker Delete. */ -public final class DataflowProfileListByResourceGroupSamples { +public final class BrokerDeleteSamples { /* - * x-ms-original-file: 2024-11-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/Broker_Delete_MaximumSet_Gen.json */ /** - * Sample code: DataflowProfile_ListByResourceGroup. + * Sample code: Broker_Delete. * * @param manager Entry point to IoTOperationsManager. */ - public static void - dataflowProfileListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.dataflowProfiles() - .listByResourceGroup("rgiotoperations", "resource-name123", com.azure.core.util.Context.NONE); + public static void brokerDelete(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokers() + .delete("rgiotoperations", "resource-name123", "resource-name123", com.azure.core.util.Context.NONE); } } ``` -### Instance_CreateOrUpdate +### Instance_ListByResourceGroup ```java -import com.azure.resourcemanager.iotoperations.models.ExtendedLocation; -import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType; -import com.azure.resourcemanager.iotoperations.models.InstanceProperties; -import com.azure.resourcemanager.iotoperations.models.ManagedServiceIdentity; -import com.azure.resourcemanager.iotoperations.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.iotoperations.models.SchemaRegistryRef; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for Instance CreateOrUpdate. + * Samples for BrokerAuthorization Get. */ -public final class InstanceCreateOrUpdateSamples { +public final class BrokerAuthorizationGetSamples { /* - * x-ms-original-file: 2024-11-01/Instance_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/BrokerAuthorization_Get_MaximumSet_Gen.json */ /** - * Sample code: Instance_CreateOrUpdate. + * Sample code: BrokerAuthorization_Get. * * @param manager Entry point to IoTOperationsManager. */ - public static void instanceCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.instances() - .define("aio-instance") - .withRegion("xvewadyhycrjpu") - .withExistingResourceGroup("rgiotoperations") - .withExtendedLocation( - new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) - .withTags(mapOf()) - .withProperties(new InstanceProperties().withDescription("kpqtgocs") - .withSchemaRegistryRef(new SchemaRegistryRef().withResourceId( - "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123"))) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + public static void brokerAuthorizationGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerAuthorizations() + .getWithResponse("rgiotoperations", "resource-name123", "resource-name123", "resource-name123", + com.azure.core.util.Context.NONE); } } ``` -### Instance_Delete +### Instance_Update ```java /** - * Samples for Instance Delete. + * Samples for BrokerAuthentication ListByResourceGroup. */ -public final class InstanceDeleteSamples { +public final class BrokerAuthenticationListByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/Instance_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: Instance_Delete. + * Sample code: BrokerAuthentication_ListByResourceGroup. * * @param manager Entry point to IoTOperationsManager. */ - public static void instanceDelete(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.instances().delete("rgiotoperations", "aio-instance", com.azure.core.util.Context.NONE); + public static void + brokerAuthenticationListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerAuthentications() + .listByResourceGroup("rgiotoperations", "resource-name123", "resource-name123", + com.azure.core.util.Context.NONE); } } ``` -### Instance_GetByResourceGroup +### Operations_List ```java -/** - * Samples for Instance GetByResourceGroup. - */ -public final class InstanceGetByResourceGroupSamples { - /* - * x-ms-original-file: 2024-11-01/Instance_Get_MaximumSet_Gen.json - */ - /** - * Sample code: Instance_Get. - * - * @param manager Entry point to IoTOperationsManager. - */ - public static void instanceGet(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.instances() - .getByResourceGroupWithResponse("rgiotoperations", "aio-instance", com.azure.core.util.Context.NONE); - } -} -``` - -### Instance_List +import com.azure.resourcemanager.iotoperations.models.AuthorizationConfig; +import com.azure.resourcemanager.iotoperations.models.AuthorizationRule; +import com.azure.resourcemanager.iotoperations.models.BrokerAuthorizationProperties; +import com.azure.resourcemanager.iotoperations.models.BrokerResourceDefinitionMethods; +import com.azure.resourcemanager.iotoperations.models.BrokerResourceRule; +import com.azure.resourcemanager.iotoperations.models.ExtendedLocation; +import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType; +import com.azure.resourcemanager.iotoperations.models.OperationalMode; +import com.azure.resourcemanager.iotoperations.models.PrincipalDefinition; +import com.azure.resourcemanager.iotoperations.models.StateStoreResourceDefinitionMethods; +import com.azure.resourcemanager.iotoperations.models.StateStoreResourceKeyTypes; +import com.azure.resourcemanager.iotoperations.models.StateStoreResourceRule; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; -```java /** - * Samples for Instance List. + * Samples for BrokerAuthorization CreateOrUpdate. */ -public final class InstanceListSamples { +public final class BrokerAuthorizationCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-11-01/Instance_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: Instance_ListBySubscription. + * Sample code: BrokerAuthorization_CreateOrUpdate. * * @param manager Entry point to IoTOperationsManager. */ public static void - instanceListBySubscription(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.instances().list(com.azure.core.util.Context.NONE); + brokerAuthorizationCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerAuthorizations() + .define("resource-name123") + .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") + .withExtendedLocation( + new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withProperties(new BrokerAuthorizationProperties() + .withAuthorizationPolicies(new AuthorizationConfig().withCache(OperationalMode.ENABLED) + .withRules(Arrays.asList(new AuthorizationRule() + .withBrokerResources( + Arrays.asList(new BrokerResourceRule().withMethod(BrokerResourceDefinitionMethods.CONNECT) + .withClientIds(Arrays.asList("nlc")) + .withTopics(Arrays.asList("wvuca")))) + .withPrincipals(new PrincipalDefinition() + .withAttributes(Arrays.asList(mapOf("key5526", "fakeTokenPlaceholder"))) + .withClientIds(Arrays.asList("smopeaeddsygz")) + .withUsernames(Arrays.asList("iozngyqndrteikszkbasinzdjtm"))) + .withStateStoreResources( + Arrays.asList(new StateStoreResourceRule().withKeyType(StateStoreResourceKeyTypes.PATTERN) + .withKeys(Arrays.asList("tkounsqtwvzyaklxjqoerpu")) + .withMethod(StateStoreResourceDefinitionMethods.READ))))))) + .create(); } -} -``` -### Instance_ListByResourceGroup - -```java -/** - * Samples for Instance ListByResourceGroup. - */ -public final class InstanceListByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/Instance_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/BrokerAuthorization_CreateOrUpdate_Simple.json */ /** - * Sample code: Instance_ListByResourceGroup. + * Sample code: BrokerAuthorization_CreateOrUpdate_Simple. * * @param manager Entry point to IoTOperationsManager. */ public static void - instanceListByResourceGroup(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.instances().listByResourceGroup("rgiotoperations", com.azure.core.util.Context.NONE); + brokerAuthorizationCreateOrUpdateSimple(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerAuthorizations() + .define("resource-name123") + .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") + .withExtendedLocation( + new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withProperties(new BrokerAuthorizationProperties() + .withAuthorizationPolicies(new AuthorizationConfig().withCache(OperationalMode.ENABLED) + .withRules(Arrays.asList(new AuthorizationRule() + .withBrokerResources( + Arrays.asList(new BrokerResourceRule().withMethod(BrokerResourceDefinitionMethods.CONNECT), + new BrokerResourceRule().withMethod(BrokerResourceDefinitionMethods.SUBSCRIBE) + .withTopics(Arrays.asList("topic", "topic/with/wildcard/#")))) + .withPrincipals(new PrincipalDefinition() + .withAttributes(Arrays.asList(mapOf("floor", "floor1", "site", "site1"))) + .withClientIds(Arrays.asList("my-client-id"))) + .withStateStoreResources( + Arrays.asList(new StateStoreResourceRule().withKeyType(StateStoreResourceKeyTypes.PATTERN) + .withKeys(Arrays.asList("*")) + .withMethod(StateStoreResourceDefinitionMethods.READ_WRITE))))))) + .create(); } -} -``` - -### Instance_Update -```java -import com.azure.resourcemanager.iotoperations.models.InstanceResource; -import com.azure.resourcemanager.iotoperations.models.ManagedServiceIdentity; -import com.azure.resourcemanager.iotoperations.models.ManagedServiceIdentityType; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Instance Update. - */ -public final class InstanceUpdateSamples { /* - * x-ms-original-file: 2024-11-01/Instance_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-01/BrokerAuthorization_CreateOrUpdate_Complex.json */ /** - * Sample code: Instance_Update. + * Sample code: BrokerAuthorization_CreateOrUpdate_Complex. * * @param manager Entry point to IoTOperationsManager. */ - public static void instanceUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - InstanceResource resource = manager.instances() - .getByResourceGroupWithResponse("rgiotoperations", "aio-instance", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .apply(); + public static void + brokerAuthorizationCreateOrUpdateComplex(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { + manager.brokerAuthorizations() + .define("resource-name123") + .withExistingBroker("rgiotoperations", "resource-name123", "resource-name123") + .withExtendedLocation( + new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withProperties(new BrokerAuthorizationProperties() + .withAuthorizationPolicies(new AuthorizationConfig().withCache(OperationalMode.ENABLED) + .withRules(Arrays.asList(new AuthorizationRule() + .withBrokerResources(Arrays.asList( + new BrokerResourceRule().withMethod(BrokerResourceDefinitionMethods.CONNECT) + .withClientIds(Arrays.asList("{principal.attributes.building}*")), + new BrokerResourceRule().withMethod(BrokerResourceDefinitionMethods.PUBLISH) + .withTopics(Arrays.asList( + "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*")), + new BrokerResourceRule().withMethod(BrokerResourceDefinitionMethods.SUBSCRIBE) + .withTopics(Arrays.asList("commands/{principal.attributes.organization}")))) + .withPrincipals(new PrincipalDefinition() + .withAttributes(Arrays.asList(mapOf("building", "17", "organization", "contoso"))) + .withUsernames(Arrays.asList("temperature-sensor", "humidity-sensor"))) + .withStateStoreResources(Arrays.asList( + new StateStoreResourceRule().withKeyType(StateStoreResourceKeyTypes.PATTERN) + .withKeys(Arrays.asList("myreadkey", "myotherkey?", "mynumerickeysuffix[0-9]", + "clients:{principal.clientId}:*")) + .withMethod(StateStoreResourceDefinitionMethods.READ), + new StateStoreResourceRule().withKeyType(StateStoreResourceKeyTypes.BINARY) + .withKeys(Arrays.asList("MTE2IDEwMSAxMTUgMTE2")) + .withMethod(StateStoreResourceDefinitionMethods.READ_WRITE))))))) + .create(); } // Use "Map.of" if available @@ -2114,24 +2135,3 @@ public final class InstanceUpdateSamples { } ``` -### Operations_List - -```java -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: 2024-11-01/Operations_List_MaximumSet_Gen.json - */ - /** - * Sample code: Operations_List. - * - * @param manager Entry point to IoTOperationsManager. - */ - public static void operationsList(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} -``` - diff --git a/sdk/iotoperations/azure-resourcemanager-iotoperations/pom.xml b/sdk/iotoperations/azure-resourcemanager-iotoperations/pom.xml index 1998f026844b..b09b39dcb146 100644 --- a/sdk/iotoperations/azure-resourcemanager-iotoperations/pom.xml +++ b/sdk/iotoperations/azure-resourcemanager-iotoperations/pom.xml @@ -46,7 +46,6 @@ 0 0 true - false diff --git a/sdk/iotoperations/azure-resourcemanager-iotoperations/tsp-location.yaml b/sdk/iotoperations/azure-resourcemanager-iotoperations/tsp-location.yaml index 2eb95b1e8539..185863fe60a9 100644 --- a/sdk/iotoperations/azure-resourcemanager-iotoperations/tsp-location.yaml +++ b/sdk/iotoperations/azure-resourcemanager-iotoperations/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/iotoperations/IoTOperations.Management -commit: 6f175c9c006269a1d0f1928fbc768cacc6ac379a +commit: 65ea9a38c20488eb047876e4207713aa4a392f82 repo: Azure/azure-rest-api-specs additionalDirectories: