From 8ab38c434f01da280ccff7229d914c0ac1862b7a Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Mon, 12 Aug 2024 14:07:17 -0700 Subject: [PATCH 01/20] Audience, SecretRef, TLS --- .../IoTOperations.Management/models/auth.tsp | 6 +++--- .../IoTOperations.Management/models/base.tsp | 8 -------- .../models/dataflows/dataflowEndpoints.tsp | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/auth.tsp b/specification/iotoperations/IoTOperations.Management/models/auth.tsp index 9ece1dc70081..540a2ff83f99 100644 --- a/specification/iotoperations/IoTOperations.Management/models/auth.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/auth.tsp @@ -11,7 +11,7 @@ namespace Microsoft.IoTOperations; @doc("DataflowEndpoint Authentication SystemAssignedManagedIdentity properties") model DataflowEndpointAuthenticationSystemAssignedManagedIdentity { @doc("Audience of the service to authenticate against. Optional; defaults to the audience for Service host configuration.") - audience: string; + audience?: string; } @doc("DataflowEndpoint Authentication UserAssignedManagedIdentity properties") @@ -20,7 +20,7 @@ model DataflowEndpointAuthenticationUserAssignedManagedIdentity { clientId: string; @doc("Resource identifier (application ID URI) of the resource, affixed with the .default suffix.") - scope: string; + audience?: string; @doc("Tenant ID.") tenantId: string; @@ -103,7 +103,7 @@ model BrokerAuthenticatorCustomAuth { @doc("X509 Certificate Authentication properties.") model X509ManualCertificate { @doc("Kubernetes secret containing an X.509 client certificate. This is a reference to the secret through an identifying name, not the secret itself.") - secretRef: KubernetesReferenceKnownType; + secretRef: string; } @doc("X509 for BrokerAuthentication.") diff --git a/specification/iotoperations/IoTOperations.Management/models/base.tsp b/specification/iotoperations/IoTOperations.Management/models/base.tsp index 61e4c6e68c38..3c20db7f0f89 100644 --- a/specification/iotoperations/IoTOperations.Management/models/base.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/base.tsp @@ -142,14 +142,6 @@ union BrokerProtocolType { WebSockets: "WebSockets", } -@doc("Kubernetes reference with known type") -model KubernetesReferenceKnownType { - @doc("Name is the name of resource being referenced") - name: string; - - @doc("Namespace is the namespace of the resource being referenced. This field is required when the resource has a namespace.") - `namespace`?: string; -} @doc("Kubernetes reference") model KubernetesReference { diff --git a/specification/iotoperations/IoTOperations.Management/models/dataflows/dataflowEndpoints.tsp b/specification/iotoperations/IoTOperations.Management/models/dataflows/dataflowEndpoints.tsp index 903a9b1c82d3..46400a74601e 100644 --- a/specification/iotoperations/IoTOperations.Management/models/dataflows/dataflowEndpoints.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/dataflows/dataflowEndpoints.tsp @@ -224,7 +224,7 @@ model DataflowEndpointKafka { partitionStrategy?: DataflowEndpointKafkaPartitionStrategy = DataflowEndpointKafkaPartitionStrategy.Default; @doc("TLS configuration.") - tls: TlsProperties; + tls?: TlsProperties = #{ mode: OperationalMode.Enabled }; @doc("Cloud event mapping config.") cloudEventMapping?: CloudEventMappingType; From 0f81eaa922e5cf3f0f75ab3f314ff8555e3ac173 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Mon, 12 Aug 2024 14:09:01 -0700 Subject: [PATCH 02/20] CloudEventAttributeType --- .../models/dataflows/dataflowEndpoints.tsp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/dataflows/dataflowEndpoints.tsp b/specification/iotoperations/IoTOperations.Management/models/dataflows/dataflowEndpoints.tsp index 46400a74601e..16f34a0ccf4c 100644 --- a/specification/iotoperations/IoTOperations.Management/models/dataflows/dataflowEndpoints.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/dataflows/dataflowEndpoints.tsp @@ -227,7 +227,7 @@ model DataflowEndpointKafka { tls?: TlsProperties = #{ mode: OperationalMode.Enabled }; @doc("Cloud event mapping config.") - cloudEventMapping?: CloudEventMappingType; + cloudEventAttributes?: CloudEventAttributeType; } @doc("Kafka endpoint Authentication properties. NOTE - only authentication property is allowed per entry") @@ -365,7 +365,7 @@ model DataflowEndpointMqtt { tls?: TlsProperties = #{ mode: OperationalMode.Enabled }; @doc("Cloud event mapping config.") - cloudEventMapping?: CloudEventMappingType; + cloudEventAttributes?: CloudEventAttributeType; } @doc("Mqtt endpoint Authentication properties. NOTE - only authentication property is allowed per entry.") @@ -402,15 +402,12 @@ union MqttRetainType { } @doc("How to map events to the cloud.") -union CloudEventMappingType { +union CloudEventAttributeType { string, - @doc("PassThrough type") - PassThrough: "PassThrough", + @doc("Propagate type") + Propagate: "Propagate", - @doc("Always type") - Always: "Always", - - @doc("Never type") - Never: "Never", + @doc("CreateOrRemap type") + CreateOrRemap: "CreateOrRemap", } From 7fc6dee7dd9fac80d6a2abfcb9fba144451d5aec Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Mon, 12 Aug 2024 14:16:00 -0700 Subject: [PATCH 03/20] x509 --- .../IoTOperations.Management/models/broker/authentications.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp b/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp index c8bb75ab700f..478a8be31bf3 100644 --- a/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp @@ -69,5 +69,5 @@ union BrokerAuthenticationMethod { ServiceAccountToken: "ServiceAccountToken", @doc("X.509 authentication configuration.") - x509Certificate: "x509Certificate", + x509: "x509", } From 0824d923216fb711aa9a7260591ed809d6e56364 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 04:45:39 -0700 Subject: [PATCH 04/20] update schema --- .../2024-08-15-preview/iotoperations.json | 70 ++++++------------- 1 file changed, 21 insertions(+), 49 deletions(-) diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json index fa1d5961b590..b1f4b4c77f85 100644 --- a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json @@ -2735,7 +2735,7 @@ "enum": [ "Custom", "ServiceAccountToken", - "x509Certificate" + "x509" ], "x-ms-enum": { "name": "BrokerAuthenticationMethod", @@ -2752,8 +2752,8 @@ "description": "ServiceAccountToken authentication configuration." }, { - "name": "x509Certificate", - "value": "x509Certificate", + "name": "x509", + "value": "x509", "description": "X.509 authentication configuration." } ] @@ -3584,32 +3584,26 @@ } } }, - "CloudEventMappingType": { + "CloudEventAttributeType": { "type": "string", "description": "How to map events to the cloud.", "enum": [ - "PassThrough", - "Always", - "Never" + "Propagate", + "CreateOrRemap" ], "x-ms-enum": { - "name": "CloudEventMappingType", + "name": "CloudEventAttributeType", "modelAsString": true, "values": [ { - "name": "PassThrough", - "value": "PassThrough", - "description": "PassThrough type" - }, - { - "name": "Always", - "value": "Always", - "description": "Always type" + "name": "Propagate", + "value": "Propagate", + "description": "Propagate type" }, { - "name": "Never", - "value": "Never", - "description": "Never type" + "name": "CreateOrRemap", + "value": "CreateOrRemap", + "description": "CreateOrRemap type" } ] } @@ -4037,10 +4031,7 @@ "type": "string", "description": "Audience of the service to authenticate against. Optional; defaults to the audience for Service host configuration." } - }, - "required": [ - "audience" - ] + } }, "DataflowEndpointAuthenticationUserAssignedManagedIdentity": { "type": "object", @@ -4050,7 +4041,7 @@ "type": "string", "description": "Client ID for the user-assigned managed identity." }, - "scope": { + "audience": { "type": "string", "description": "Resource identifier (application ID URI) of the resource, affixed with the .default suffix." }, @@ -4061,7 +4052,6 @@ }, "required": [ "clientId", - "scope", "tenantId" ] }, @@ -4404,14 +4394,13 @@ "$ref": "#/definitions/TlsProperties", "description": "TLS configuration." }, - "cloudEventMapping": { - "$ref": "#/definitions/CloudEventMappingType", + "cloudEventAttributes": { + "$ref": "#/definitions/CloudEventAttributeType", "description": "Cloud event mapping config." } }, "required": [ - "authentication", - "tls" + "authentication" ] }, "DataflowEndpointKafkaAcks": { @@ -4684,8 +4673,8 @@ "$ref": "#/definitions/TlsProperties", "description": "TLS configuration." }, - "cloudEventMapping": { - "$ref": "#/definitions/CloudEventMappingType", + "cloudEventAttributes": { + "$ref": "#/definitions/CloudEventAttributeType", "description": "Cloud event mapping config." } }, @@ -5471,23 +5460,6 @@ "name" ] }, - "KubernetesReferenceKnownType": { - "type": "object", - "description": "Kubernetes reference with known type", - "properties": { - "name": { - "type": "string", - "description": "Name is the name of resource being referenced" - }, - "namespace": { - "type": "string", - "description": "Namespace is the namespace of the resource being referenced. This field is required when the resource has a namespace." - } - }, - "required": [ - "name" - ] - }, "ListenerPort": { "type": "object", "description": "Defines a TCP port on which a `BrokerListener` listens.", @@ -6671,7 +6643,7 @@ "description": "X509 Certificate Authentication properties.", "properties": { "secretRef": { - "$ref": "#/definitions/KubernetesReferenceKnownType", + "type": "string", "description": "Kubernetes secret containing an X.509 client certificate. This is a reference to the secret through an identifying name, not the secret itself." } }, From 68eb035fe284f4f91e067c24f7e1604158a6a67a Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 09:50:00 -0700 Subject: [PATCH 05/20] PR feedback --- .../iotoperations/IoTOperations.Management/models/auth.tsp | 2 +- .../IoTOperations.Management/models/broker/authentications.tsp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/auth.tsp b/specification/iotoperations/IoTOperations.Management/models/auth.tsp index 540a2ff83f99..331cb1893bb5 100644 --- a/specification/iotoperations/IoTOperations.Management/models/auth.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/auth.tsp @@ -20,7 +20,7 @@ model DataflowEndpointAuthenticationUserAssignedManagedIdentity { clientId: string; @doc("Resource identifier (application ID URI) of the resource, affixed with the .default suffix.") - audience?: string; + scope?: string; @doc("Tenant ID.") tenantId: string; diff --git a/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp b/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp index 478a8be31bf3..b1298c8f1adb 100644 --- a/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp @@ -69,5 +69,5 @@ union BrokerAuthenticationMethod { ServiceAccountToken: "ServiceAccountToken", @doc("X.509 authentication configuration.") - x509: "x509", + x509: "X509", } From 1015d574b877ab91b35e2e01845efcea64f42a6d Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 09:50:29 -0700 Subject: [PATCH 06/20] schema update --- .../preview/2024-08-15-preview/iotoperations.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json index b1f4b4c77f85..c974d1a8eb45 100644 --- a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json @@ -2735,7 +2735,7 @@ "enum": [ "Custom", "ServiceAccountToken", - "x509" + "X509" ], "x-ms-enum": { "name": "BrokerAuthenticationMethod", @@ -2753,7 +2753,7 @@ }, { "name": "x509", - "value": "x509", + "value": "X509", "description": "X.509 authentication configuration." } ] @@ -4041,7 +4041,7 @@ "type": "string", "description": "Client ID for the user-assigned managed identity." }, - "audience": { + "scope": { "type": "string", "description": "Resource identifier (application ID URI) of the resource, affixed with the .default suffix." }, From fb540ba46939a9f9ca2524758dc2c4accfc415ac Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 09:58:13 -0700 Subject: [PATCH 07/20] key as well --- .../IoTOperations.Management/models/broker/authentications.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp b/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp index b1298c8f1adb..7ece81f4d3d5 100644 --- a/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp @@ -69,5 +69,5 @@ union BrokerAuthenticationMethod { ServiceAccountToken: "ServiceAccountToken", @doc("X.509 authentication configuration.") - x509: "X509", + X509: "X509", } From 5cdc6d57785de8fc97b147cf2dd6b48cf887733b Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 10:34:31 -0700 Subject: [PATCH 08/20] remove MQ disable/enable --- .../IoTOperations.Management/models/instance.tsp | 3 --- .../preview/2024-08-15-preview/iotoperations.json | 6 +----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/instance.tsp b/specification/iotoperations/IoTOperations.Management/models/instance.tsp index 9f25a5b1c7aa..3a26629b475e 100644 --- a/specification/iotoperations/IoTOperations.Management/models/instance.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/instance.tsp @@ -78,9 +78,6 @@ model Components { @doc("The properties of the dataflows instance.") dataflows?: DataFlowInstanceProperties = #{ enabled: true }; - @doc("The properties of the device provisioning instance.") - mqttbroker?: MqttBrokerInstanceProperties = #{ enabled: true }; - @doc("The properties of the device provisioning instance.") schemaregistry?: SchemaRegistryInstanceProperties = #{ enabled: true }; } diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json index c974d1a8eb45..200592a4c580 100644 --- a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json @@ -2752,7 +2752,7 @@ "description": "ServiceAccountToken authentication configuration." }, { - "name": "x509", + "name": "X509", "value": "X509", "description": "X.509 authentication configuration." } @@ -3628,10 +3628,6 @@ "$ref": "#/definitions/DataFlowInstanceProperties", "description": "The properties of the dataflows instance." }, - "mqttbroker": { - "$ref": "#/definitions/MqttBrokerInstanceProperties", - "description": "The properties of the device provisioning instance." - }, "schemaregistry": { "$ref": "#/definitions/SchemaRegistryInstanceProperties", "description": "The properties of the device provisioning instance." From cb713edea3c7a1bba1844b1be869dc5defda545a Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 11:04:51 -0700 Subject: [PATCH 09/20] bring back broker --- .../iotoperations/IoTOperations.Management/models/instance.tsp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/iotoperations/IoTOperations.Management/models/instance.tsp b/specification/iotoperations/IoTOperations.Management/models/instance.tsp index 3a26629b475e..9f25a5b1c7aa 100644 --- a/specification/iotoperations/IoTOperations.Management/models/instance.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/instance.tsp @@ -78,6 +78,9 @@ model Components { @doc("The properties of the dataflows instance.") dataflows?: DataFlowInstanceProperties = #{ enabled: true }; + @doc("The properties of the device provisioning instance.") + mqttbroker?: MqttBrokerInstanceProperties = #{ enabled: true }; + @doc("The properties of the device provisioning instance.") schemaregistry?: SchemaRegistryInstanceProperties = #{ enabled: true }; } From 8307d9d2f3c5740d5ecf594ca7e0dabbf6768f1b Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 11:05:26 -0700 Subject: [PATCH 10/20] generate schema --- .../preview/2024-08-15-preview/iotoperations.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json index 200592a4c580..bffde78f3977 100644 --- a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json @@ -3628,6 +3628,10 @@ "$ref": "#/definitions/DataFlowInstanceProperties", "description": "The properties of the dataflows instance." }, + "mqttbroker": { + "$ref": "#/definitions/MqttBrokerInstanceProperties", + "description": "The properties of the device provisioning instance." + }, "schemaregistry": { "$ref": "#/definitions/SchemaRegistryInstanceProperties", "description": "The properties of the device provisioning instance." From 8cda0bbf36f688cf923db8bfb6528f85d8e1cd87 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 11:06:03 -0700 Subject: [PATCH 11/20] format --- .../iotoperations/IoTOperations.Management/models/base.tsp | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/base.tsp b/specification/iotoperations/IoTOperations.Management/models/base.tsp index 3c20db7f0f89..4028330cda63 100644 --- a/specification/iotoperations/IoTOperations.Management/models/base.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/base.tsp @@ -142,7 +142,6 @@ union BrokerProtocolType { WebSockets: "WebSockets", } - @doc("Kubernetes reference") model KubernetesReference { ...LocalKubernetesReference; From 9f29ab4158447e3e3344226726f567c7f165def0 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 11:38:16 -0700 Subject: [PATCH 12/20] make props read-only --- .../IoTOperations.Management/models/instance.tsp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/specification/iotoperations/IoTOperations.Management/models/instance.tsp b/specification/iotoperations/IoTOperations.Management/models/instance.tsp index 9f25a5b1c7aa..223ada7b87a2 100644 --- a/specification/iotoperations/IoTOperations.Management/models/instance.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/instance.tsp @@ -97,34 +97,40 @@ model ServiceAccountProperties { @doc("The properties of an ADR instance.") model AdrProperties { @doc("This determines if the ADR service is enabled.") + @visibility("read") enabled: boolean; } @doc("The properties of an AKRI instance.") model AkriInstanceProperties { @doc("This determines if the AKRI service is enabled.") + @visibility("read") enabled: boolean; } @doc("The properties of a Connector instance.") model ConnectorInstanceProperties { @doc("This determines if the Connector service is enabled.") + @visibility("read") enabled: boolean; } @doc("The properties of an DataFlow instance.") model DataFlowInstanceProperties { @doc("This determines if the DataFlow service is enabled.") + @visibility("read") enabled: boolean; } @doc("The properties of an MQTT Broker instance.") model MqttBrokerInstanceProperties { @doc("This determines if the MQTT Broker service is enabled.") + @visibility("read") enabled: boolean; } @doc("The properties of a Schema Registry instance.") model SchemaRegistryInstanceProperties { @doc("This determines if the Schema Registry service is enabled.") + @visibility("read") enabled: boolean; } From 5a84cea684a701442bd8651953d7f98b87f3189f Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 13:04:41 -0700 Subject: [PATCH 13/20] remove mq --- .../iotoperations/IoTOperations.Management/models/instance.tsp | 3 --- 1 file changed, 3 deletions(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/instance.tsp b/specification/iotoperations/IoTOperations.Management/models/instance.tsp index 223ada7b87a2..a3c44caa24d9 100644 --- a/specification/iotoperations/IoTOperations.Management/models/instance.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/instance.tsp @@ -78,9 +78,6 @@ model Components { @doc("The properties of the dataflows instance.") dataflows?: DataFlowInstanceProperties = #{ enabled: true }; - @doc("The properties of the device provisioning instance.") - mqttbroker?: MqttBrokerInstanceProperties = #{ enabled: true }; - @doc("The properties of the device provisioning instance.") schemaregistry?: SchemaRegistryInstanceProperties = #{ enabled: true }; } From db925abed740454eb50f6320b8ca58c3f388c731 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 13:05:14 -0700 Subject: [PATCH 14/20] schema update --- .../2024-08-15-preview/iotoperations.json | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json index bffde78f3977..4647e0aa338b 100644 --- a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json @@ -2529,7 +2529,8 @@ "properties": { "enabled": { "type": "boolean", - "description": "This determines if the ADR service is enabled." + "description": "This determines if the ADR service is enabled.", + "readOnly": true } }, "required": [ @@ -2581,7 +2582,8 @@ "properties": { "enabled": { "type": "boolean", - "description": "This determines if the AKRI service is enabled." + "description": "This determines if the AKRI service is enabled.", + "readOnly": true } }, "required": [ @@ -3628,10 +3630,6 @@ "$ref": "#/definitions/DataFlowInstanceProperties", "description": "The properties of the dataflows instance." }, - "mqttbroker": { - "$ref": "#/definitions/MqttBrokerInstanceProperties", - "description": "The properties of the device provisioning instance." - }, "schemaregistry": { "$ref": "#/definitions/SchemaRegistryInstanceProperties", "description": "The properties of the device provisioning instance." @@ -3644,7 +3642,8 @@ "properties": { "enabled": { "type": "boolean", - "description": "This determines if the Connector service is enabled." + "description": "This determines if the Connector service is enabled.", + "readOnly": true } }, "required": [ @@ -3711,7 +3710,8 @@ "properties": { "enabled": { "type": "boolean", - "description": "This determines if the DataFlow service is enabled." + "description": "This determines if the DataFlow service is enabled.", + "readOnly": true } }, "required": [ @@ -5660,7 +5660,8 @@ "properties": { "enabled": { "type": "boolean", - "description": "This determines if the MQTT Broker service is enabled." + "description": "This determines if the MQTT Broker service is enabled.", + "readOnly": true } }, "required": [ @@ -6059,7 +6060,8 @@ "properties": { "enabled": { "type": "boolean", - "description": "This determines if the Schema Registry service is enabled." + "description": "This determines if the Schema Registry service is enabled.", + "readOnly": true } }, "required": [ From b1053ef7befc78effd0dfb85df8ec0b1f213fc79 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 13:34:32 -0700 Subject: [PATCH 15/20] make togles read write --- .../models/instance.tsp | 12 ------------ .../2024-08-15-preview/iotoperations.json | 18 ++++++------------ 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/instance.tsp b/specification/iotoperations/IoTOperations.Management/models/instance.tsp index a3c44caa24d9..3b3aad8c4c8c 100644 --- a/specification/iotoperations/IoTOperations.Management/models/instance.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/instance.tsp @@ -94,40 +94,28 @@ model ServiceAccountProperties { @doc("The properties of an ADR instance.") model AdrProperties { @doc("This determines if the ADR service is enabled.") - @visibility("read") enabled: boolean; } @doc("The properties of an AKRI instance.") model AkriInstanceProperties { @doc("This determines if the AKRI service is enabled.") - @visibility("read") enabled: boolean; } @doc("The properties of a Connector instance.") model ConnectorInstanceProperties { @doc("This determines if the Connector service is enabled.") - @visibility("read") enabled: boolean; } @doc("The properties of an DataFlow instance.") model DataFlowInstanceProperties { @doc("This determines if the DataFlow service is enabled.") - @visibility("read") - enabled: boolean; -} - -@doc("The properties of an MQTT Broker instance.") -model MqttBrokerInstanceProperties { - @doc("This determines if the MQTT Broker service is enabled.") - @visibility("read") enabled: boolean; } @doc("The properties of a Schema Registry instance.") model SchemaRegistryInstanceProperties { @doc("This determines if the Schema Registry service is enabled.") - @visibility("read") enabled: boolean; } diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json index 4647e0aa338b..200592a4c580 100644 --- a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json @@ -2529,8 +2529,7 @@ "properties": { "enabled": { "type": "boolean", - "description": "This determines if the ADR service is enabled.", - "readOnly": true + "description": "This determines if the ADR service is enabled." } }, "required": [ @@ -2582,8 +2581,7 @@ "properties": { "enabled": { "type": "boolean", - "description": "This determines if the AKRI service is enabled.", - "readOnly": true + "description": "This determines if the AKRI service is enabled." } }, "required": [ @@ -3642,8 +3640,7 @@ "properties": { "enabled": { "type": "boolean", - "description": "This determines if the Connector service is enabled.", - "readOnly": true + "description": "This determines if the Connector service is enabled." } }, "required": [ @@ -3710,8 +3707,7 @@ "properties": { "enabled": { "type": "boolean", - "description": "This determines if the DataFlow service is enabled.", - "readOnly": true + "description": "This determines if the DataFlow service is enabled." } }, "required": [ @@ -5660,8 +5656,7 @@ "properties": { "enabled": { "type": "boolean", - "description": "This determines if the MQTT Broker service is enabled.", - "readOnly": true + "description": "This determines if the MQTT Broker service is enabled." } }, "required": [ @@ -6060,8 +6055,7 @@ "properties": { "enabled": { "type": "boolean", - "description": "This determines if the Schema Registry service is enabled.", - "readOnly": true + "description": "This determines if the Schema Registry service is enabled." } }, "required": [ From 0331f508b19896116cd1055c85dad212b6027bff Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 13:34:55 -0700 Subject: [PATCH 16/20] schema update --- .../preview/2024-08-15-preview/iotoperations.json | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json index 200592a4c580..5cfd420b99df 100644 --- a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json @@ -5650,19 +5650,6 @@ ] } }, - "MqttBrokerInstanceProperties": { - "type": "object", - "description": "The properties of an MQTT Broker instance.", - "properties": { - "enabled": { - "type": "boolean", - "description": "This determines if the MQTT Broker service is enabled." - } - }, - "required": [ - "enabled" - ] - }, "MqttRetainType": { "type": "string", "description": "Broker Retain types", From 6e050494e8345c3a4644df30362ba5a392c1f94d Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 14:47:16 -0700 Subject: [PATCH 17/20] use mode flags --- .../models/instance.tsp | 25 ++++---- .../2024-08-15-preview/iotoperations.json | 60 ++++++++++++------- 2 files changed, 55 insertions(+), 30 deletions(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/instance.tsp b/specification/iotoperations/IoTOperations.Management/models/instance.tsp index 3b3aad8c4c8c..60f10fdec63d 100644 --- a/specification/iotoperations/IoTOperations.Management/models/instance.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/instance.tsp @@ -67,19 +67,19 @@ model InstanceProperties { @doc("The configuration for components of the AIO Instance.") model Components { @doc("The properties of the ADR instance.") - adr?: AdrProperties = #{ enabled: true }; + adr?: AdrProperties = #{ mode: OperationalMode.Enabled }; @doc("The properties of the AKRI instance.") - akri?: AkriInstanceProperties = #{ enabled: true }; + akri?: AkriInstanceProperties = #{ mode: OperationalMode.Enabled }; @doc("The properties of the connectors instance.") - connectors?: ConnectorInstanceProperties = #{ enabled: true }; + connectors?: ConnectorInstanceProperties = #{ mode: OperationalMode.Enabled }; @doc("The properties of the dataflows instance.") - dataflows?: DataFlowInstanceProperties = #{ enabled: true }; + dataflows?: DataFlowInstanceProperties = #{ mode: OperationalMode.Enabled }; @doc("The properties of the device provisioning instance.") - schemaregistry?: SchemaRegistryInstanceProperties = #{ enabled: true }; + schemaregistry?: SchemaRegistryInstanceProperties = #{ mode: OperationalMode.Enabled }; } @doc("The properties of a Service Account.") @@ -94,28 +94,33 @@ model ServiceAccountProperties { @doc("The properties of an ADR instance.") model AdrProperties { @doc("This determines if the ADR service is enabled.") - enabled: boolean; + @visibility("create", "read") + mode: OperationalMode; } @doc("The properties of an AKRI instance.") model AkriInstanceProperties { @doc("This determines if the AKRI service is enabled.") - enabled: boolean; + @visibility("create", "read") + mode: OperationalMode; } @doc("The properties of a Connector instance.") model ConnectorInstanceProperties { @doc("This determines if the Connector service is enabled.") - enabled: boolean; + @visibility("create", "read") + mode: OperationalMode; } @doc("The properties of an DataFlow instance.") model DataFlowInstanceProperties { @doc("This determines if the DataFlow service is enabled.") - enabled: boolean; + @visibility("create", "read") + mode: OperationalMode; } @doc("The properties of a Schema Registry instance.") model SchemaRegistryInstanceProperties { @doc("This determines if the Schema Registry service is enabled.") - enabled: boolean; + @visibility("create", "read") + mode: OperationalMode; } diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json index 5cfd420b99df..dce27514b2a5 100644 --- a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json @@ -2527,13 +2527,17 @@ "type": "object", "description": "The properties of an ADR instance.", "properties": { - "enabled": { - "type": "boolean", - "description": "This determines if the ADR service is enabled." + "mode": { + "$ref": "#/definitions/OperationalMode", + "description": "This determines if the ADR service is enabled.", + "x-ms-mutability": [ + "read", + "create" + ] } }, "required": [ - "enabled" + "mode" ] }, "AdvancedSettings": { @@ -2579,13 +2583,17 @@ "type": "object", "description": "The properties of an AKRI instance.", "properties": { - "enabled": { - "type": "boolean", - "description": "This determines if the AKRI service is enabled." + "mode": { + "$ref": "#/definitions/OperationalMode", + "description": "This determines if the AKRI service is enabled.", + "x-ms-mutability": [ + "read", + "create" + ] } }, "required": [ - "enabled" + "mode" ] }, "AnonymousMethod": { @@ -3638,13 +3646,17 @@ "type": "object", "description": "The properties of a Connector instance.", "properties": { - "enabled": { - "type": "boolean", - "description": "This determines if the Connector service is enabled." + "mode": { + "$ref": "#/definitions/OperationalMode", + "description": "This determines if the Connector service is enabled.", + "x-ms-mutability": [ + "read", + "create" + ] } }, "required": [ - "enabled" + "mode" ] }, "DataExplorerAuthMethod": { @@ -3705,13 +3717,17 @@ "type": "object", "description": "The properties of an DataFlow instance.", "properties": { - "enabled": { - "type": "boolean", - "description": "This determines if the DataFlow service is enabled." + "mode": { + "$ref": "#/definitions/OperationalMode", + "description": "This determines if the DataFlow service is enabled.", + "x-ms-mutability": [ + "read", + "create" + ] } }, "required": [ - "enabled" + "mode" ] }, "DataLakeStorageAuthMethod": { @@ -6040,13 +6056,17 @@ "type": "object", "description": "The properties of a Schema Registry instance.", "properties": { - "enabled": { - "type": "boolean", - "description": "This determines if the Schema Registry service is enabled." + "mode": { + "$ref": "#/definitions/OperationalMode", + "description": "This determines if the Schema Registry service is enabled.", + "x-ms-mutability": [ + "read", + "create" + ] } }, "required": [ - "enabled" + "mode" ] }, "SelfCheck": { From b8ccd92ce718e68d82b914732db7bf1275e2d300 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 14:52:30 -0700 Subject: [PATCH 18/20] new line --- .../IoTOperations.Management/models/instance.tsp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/instance.tsp b/specification/iotoperations/IoTOperations.Management/models/instance.tsp index 60f10fdec63d..3e6fd96129d0 100644 --- a/specification/iotoperations/IoTOperations.Management/models/instance.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/instance.tsp @@ -79,7 +79,9 @@ model Components { dataflows?: DataFlowInstanceProperties = #{ mode: OperationalMode.Enabled }; @doc("The properties of the device provisioning instance.") - schemaregistry?: SchemaRegistryInstanceProperties = #{ mode: OperationalMode.Enabled }; + schemaregistry?: SchemaRegistryInstanceProperties = #{ + mode: OperationalMode.Enabled, + }; } @doc("The properties of a Service Account.") From 310e9b501f274d96a11fe119c9d6ff41fcf27f53 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 15:11:43 -0700 Subject: [PATCH 19/20] switch to state --- .../models/instance.tsp | 24 +++++++++---------- .../2024-08-15-preview/iotoperations.json | 24 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/instance.tsp b/specification/iotoperations/IoTOperations.Management/models/instance.tsp index 3e6fd96129d0..28f5ef78f45a 100644 --- a/specification/iotoperations/IoTOperations.Management/models/instance.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/instance.tsp @@ -67,20 +67,20 @@ model InstanceProperties { @doc("The configuration for components of the AIO Instance.") model Components { @doc("The properties of the ADR instance.") - adr?: AdrProperties = #{ mode: OperationalMode.Enabled }; + adr?: AdrProperties = #{ state: OperationalMode.Enabled }; @doc("The properties of the AKRI instance.") - akri?: AkriInstanceProperties = #{ mode: OperationalMode.Enabled }; + akri?: AkriInstanceProperties = #{ state: OperationalMode.Enabled }; @doc("The properties of the connectors instance.") - connectors?: ConnectorInstanceProperties = #{ mode: OperationalMode.Enabled }; + connectors?: ConnectorInstanceProperties = #{ state: OperationalMode.Enabled }; @doc("The properties of the dataflows instance.") - dataflows?: DataFlowInstanceProperties = #{ mode: OperationalMode.Enabled }; + dataflows?: DataFlowInstanceProperties = #{ state: OperationalMode.Enabled }; @doc("The properties of the device provisioning instance.") - schemaregistry?: SchemaRegistryInstanceProperties = #{ - mode: OperationalMode.Enabled, + schemaRegistry?: SchemaRegistryInstanceProperties = #{ + state: OperationalMode.Enabled, }; } @@ -97,32 +97,32 @@ model ServiceAccountProperties { model AdrProperties { @doc("This determines if the ADR service is enabled.") @visibility("create", "read") - mode: OperationalMode; + state: OperationalMode; } @doc("The properties of an AKRI instance.") model AkriInstanceProperties { @doc("This determines if the AKRI service is enabled.") @visibility("create", "read") - mode: OperationalMode; + state: OperationalMode; } @doc("The properties of a Connector instance.") model ConnectorInstanceProperties { @doc("This determines if the Connector service is enabled.") @visibility("create", "read") - mode: OperationalMode; + state: OperationalMode; } @doc("The properties of an DataFlow instance.") model DataFlowInstanceProperties { - @doc("This determines if the DataFlow service is enabled.") + @doc("This determines if the Dataflow service is enabled.") @visibility("create", "read") - mode: OperationalMode; + state: OperationalMode; } @doc("The properties of a Schema Registry instance.") model SchemaRegistryInstanceProperties { @doc("This determines if the Schema Registry service is enabled.") @visibility("create", "read") - mode: OperationalMode; + state: OperationalMode; } diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json index dce27514b2a5..f1a4e2b3ad92 100644 --- a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/preview/2024-08-15-preview/iotoperations.json @@ -2527,7 +2527,7 @@ "type": "object", "description": "The properties of an ADR instance.", "properties": { - "mode": { + "state": { "$ref": "#/definitions/OperationalMode", "description": "This determines if the ADR service is enabled.", "x-ms-mutability": [ @@ -2537,7 +2537,7 @@ } }, "required": [ - "mode" + "state" ] }, "AdvancedSettings": { @@ -2583,7 +2583,7 @@ "type": "object", "description": "The properties of an AKRI instance.", "properties": { - "mode": { + "state": { "$ref": "#/definitions/OperationalMode", "description": "This determines if the AKRI service is enabled.", "x-ms-mutability": [ @@ -2593,7 +2593,7 @@ } }, "required": [ - "mode" + "state" ] }, "AnonymousMethod": { @@ -3636,7 +3636,7 @@ "$ref": "#/definitions/DataFlowInstanceProperties", "description": "The properties of the dataflows instance." }, - "schemaregistry": { + "schemaRegistry": { "$ref": "#/definitions/SchemaRegistryInstanceProperties", "description": "The properties of the device provisioning instance." } @@ -3646,7 +3646,7 @@ "type": "object", "description": "The properties of a Connector instance.", "properties": { - "mode": { + "state": { "$ref": "#/definitions/OperationalMode", "description": "This determines if the Connector service is enabled.", "x-ms-mutability": [ @@ -3656,7 +3656,7 @@ } }, "required": [ - "mode" + "state" ] }, "DataExplorerAuthMethod": { @@ -3717,9 +3717,9 @@ "type": "object", "description": "The properties of an DataFlow instance.", "properties": { - "mode": { + "state": { "$ref": "#/definitions/OperationalMode", - "description": "This determines if the DataFlow service is enabled.", + "description": "This determines if the Dataflow service is enabled.", "x-ms-mutability": [ "read", "create" @@ -3727,7 +3727,7 @@ } }, "required": [ - "mode" + "state" ] }, "DataLakeStorageAuthMethod": { @@ -6056,7 +6056,7 @@ "type": "object", "description": "The properties of a Schema Registry instance.", "properties": { - "mode": { + "state": { "$ref": "#/definitions/OperationalMode", "description": "This determines if the Schema Registry service is enabled.", "x-ms-mutability": [ @@ -6066,7 +6066,7 @@ } }, "required": [ - "mode" + "state" ] }, "SelfCheck": { From 684c33d0d2966423cf34ff242ae8c0a3c17092a9 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Tue, 13 Aug 2024 15:26:46 -0700 Subject: [PATCH 20/20] state --- .../IoTOperations.Management/models/instance.tsp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/iotoperations/IoTOperations.Management/models/instance.tsp b/specification/iotoperations/IoTOperations.Management/models/instance.tsp index 28f5ef78f45a..df1c26a9866f 100644 --- a/specification/iotoperations/IoTOperations.Management/models/instance.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/instance.tsp @@ -73,7 +73,9 @@ model Components { akri?: AkriInstanceProperties = #{ state: OperationalMode.Enabled }; @doc("The properties of the connectors instance.") - connectors?: ConnectorInstanceProperties = #{ state: OperationalMode.Enabled }; + connectors?: ConnectorInstanceProperties = #{ + state: OperationalMode.Enabled, + }; @doc("The properties of the dataflows instance.") dataflows?: DataFlowInstanceProperties = #{ state: OperationalMode.Enabled };