diff --git a/specification/iotoperations/IoTOperations.Management/models/auth.tsp b/specification/iotoperations/IoTOperations.Management/models/auth.tsp index 9ece1dc70081..331cb1893bb5 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; + scope?: 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..4028330cda63 100644 --- a/specification/iotoperations/IoTOperations.Management/models/base.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/base.tsp @@ -142,15 +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 { ...LocalKubernetesReference; diff --git a/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp b/specification/iotoperations/IoTOperations.Management/models/broker/authentications.tsp index c8bb75ab700f..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.") - x509Certificate: "x509Certificate", + X509: "X509", } diff --git a/specification/iotoperations/IoTOperations.Management/models/dataflows/dataflowEndpoints.tsp b/specification/iotoperations/IoTOperations.Management/models/dataflows/dataflowEndpoints.tsp index 903a9b1c82d3..16f34a0ccf4c 100644 --- a/specification/iotoperations/IoTOperations.Management/models/dataflows/dataflowEndpoints.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/dataflows/dataflowEndpoints.tsp @@ -224,10 +224,10 @@ model DataflowEndpointKafka { partitionStrategy?: DataflowEndpointKafkaPartitionStrategy = DataflowEndpointKafkaPartitionStrategy.Default; @doc("TLS configuration.") - tls: TlsProperties; + 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("Always type") - Always: "Always", + @doc("Propagate type") + Propagate: "Propagate", - @doc("Never type") - Never: "Never", + @doc("CreateOrRemap type") + CreateOrRemap: "CreateOrRemap", } diff --git a/specification/iotoperations/IoTOperations.Management/models/instance.tsp b/specification/iotoperations/IoTOperations.Management/models/instance.tsp index 9f25a5b1c7aa..df1c26a9866f 100644 --- a/specification/iotoperations/IoTOperations.Management/models/instance.tsp +++ b/specification/iotoperations/IoTOperations.Management/models/instance.tsp @@ -67,22 +67,23 @@ 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 = #{ state: OperationalMode.Enabled }; @doc("The properties of the AKRI instance.") - akri?: AkriInstanceProperties = #{ enabled: true }; + akri?: AkriInstanceProperties = #{ state: OperationalMode.Enabled }; @doc("The properties of the connectors instance.") - connectors?: ConnectorInstanceProperties = #{ enabled: true }; + connectors?: ConnectorInstanceProperties = #{ + state: OperationalMode.Enabled, + }; @doc("The properties of the dataflows instance.") - dataflows?: DataFlowInstanceProperties = #{ enabled: true }; + dataflows?: DataFlowInstanceProperties = #{ state: OperationalMode.Enabled }; @doc("The properties of the device provisioning instance.") - mqttbroker?: MqttBrokerInstanceProperties = #{ enabled: true }; - - @doc("The properties of the device provisioning instance.") - schemaregistry?: SchemaRegistryInstanceProperties = #{ enabled: true }; + schemaRegistry?: SchemaRegistryInstanceProperties = #{ + state: OperationalMode.Enabled, + }; } @doc("The properties of a Service Account.") @@ -97,34 +98,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") + state: OperationalMode; } @doc("The properties of an AKRI instance.") model AkriInstanceProperties { @doc("This determines if the AKRI service is enabled.") - enabled: boolean; + @visibility("create", "read") + state: OperationalMode; } @doc("The properties of a Connector instance.") model ConnectorInstanceProperties { @doc("This determines if the Connector service is enabled.") - enabled: boolean; + @visibility("create", "read") + state: OperationalMode; } @doc("The properties of an DataFlow instance.") model DataFlowInstanceProperties { - @doc("This determines if the DataFlow service is enabled.") - enabled: boolean; -} - -@doc("The properties of an MQTT Broker instance.") -model MqttBrokerInstanceProperties { - @doc("This determines if the MQTT Broker service is enabled.") - enabled: boolean; + @doc("This determines if the Dataflow service is enabled.") + @visibility("create", "read") + state: 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") + 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 fa1d5961b590..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,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." + "state": { + "$ref": "#/definitions/OperationalMode", + "description": "This determines if the ADR service is enabled.", + "x-ms-mutability": [ + "read", + "create" + ] } }, "required": [ - "enabled" + "state" ] }, "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." + "state": { + "$ref": "#/definitions/OperationalMode", + "description": "This determines if the AKRI service is enabled.", + "x-ms-mutability": [ + "read", + "create" + ] } }, "required": [ - "enabled" + "state" ] }, "AnonymousMethod": { @@ -2735,7 +2743,7 @@ "enum": [ "Custom", "ServiceAccountToken", - "x509Certificate" + "X509" ], "x-ms-enum": { "name": "BrokerAuthenticationMethod", @@ -2752,8 +2760,8 @@ "description": "ServiceAccountToken authentication configuration." }, { - "name": "x509Certificate", - "value": "x509Certificate", + "name": "X509", + "value": "X509", "description": "X.509 authentication configuration." } ] @@ -3584,32 +3592,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": "Propagate", + "value": "Propagate", + "description": "Propagate type" }, { - "name": "Always", - "value": "Always", - "description": "Always type" - }, - { - "name": "Never", - "value": "Never", - "description": "Never type" + "name": "CreateOrRemap", + "value": "CreateOrRemap", + "description": "CreateOrRemap type" } ] } @@ -3634,11 +3636,7 @@ "$ref": "#/definitions/DataFlowInstanceProperties", "description": "The properties of the dataflows instance." }, - "mqttbroker": { - "$ref": "#/definitions/MqttBrokerInstanceProperties", - "description": "The properties of the device provisioning instance." - }, - "schemaregistry": { + "schemaRegistry": { "$ref": "#/definitions/SchemaRegistryInstanceProperties", "description": "The properties of the device provisioning instance." } @@ -3648,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." + "state": { + "$ref": "#/definitions/OperationalMode", + "description": "This determines if the Connector service is enabled.", + "x-ms-mutability": [ + "read", + "create" + ] } }, "required": [ - "enabled" + "state" ] }, "DataExplorerAuthMethod": { @@ -3715,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." + "state": { + "$ref": "#/definitions/OperationalMode", + "description": "This determines if the Dataflow service is enabled.", + "x-ms-mutability": [ + "read", + "create" + ] } }, "required": [ - "enabled" + "state" ] }, "DataLakeStorageAuthMethod": { @@ -4037,10 +4043,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", @@ -4061,7 +4064,6 @@ }, "required": [ "clientId", - "scope", "tenantId" ] }, @@ -4404,14 +4406,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 +4685,8 @@ "$ref": "#/definitions/TlsProperties", "description": "TLS configuration." }, - "cloudEventMapping": { - "$ref": "#/definitions/CloudEventMappingType", + "cloudEventAttributes": { + "$ref": "#/definitions/CloudEventAttributeType", "description": "Cloud event mapping config." } }, @@ -5471,23 +5472,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.", @@ -5682,19 +5666,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", @@ -6085,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." + "state": { + "$ref": "#/definitions/OperationalMode", + "description": "This determines if the Schema Registry service is enabled.", + "x-ms-mutability": [ + "read", + "create" + ] } }, "required": [ - "enabled" + "state" ] }, "SelfCheck": { @@ -6671,7 +6646,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." } },