diff --git a/specification/deviceprovisioningservices/DeviceProvisioningServices.Management/examples/2025-02-01-preview/DPSCreateWithNamespace.json b/specification/deviceprovisioningservices/DeviceProvisioningServices.Management/examples/2025-02-01-preview/DPSCreateWithNamespace.json new file mode 100644 index 000000000000..a957cc575fa0 --- /dev/null +++ b/specification/deviceprovisioningservices/DeviceProvisioningServices.Management/examples/2025-02-01-preview/DPSCreateWithNamespace.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2025-02-01-preview", + "iotDpsDescription": { + "location": "East US", + "properties": { + "enableDataResidency": false + }, + "sku": { + "name": "S1", + "capacity": 1 + }, + "tags": {} + }, + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "name": "myFirstProvisioningService", + "type": "Microsoft.Devices/ProvisioningServices", + "etag": "AAAAAAAADGk=", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService", + "location": "eastus", + "properties": { + "allocationPolicy": "Hashed", + "authorizationPolicies": [], + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "enableDataResidency": false, + "idScope": "0ne00000012", + "portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net", + "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net", + "state": "Active", + "deviceRegistryNamespace": { + "resourceId": "/subscriptions/8c64812d-6e59-4e65-96b3-14a7cdb1a4e4/resourceGroups/myRg/providers/Microsoft.DeviceRegistry/namespaces/myNamespace", + "authenticationType": "UserAssigned", + "selectedUserAssignedIdentityResourceId": "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1" + } + }, + "resourcegroup": "myResourceGroup", + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "identity": { + "type": "SystemAssigned, UserAssigned", + "userAssignedIdentities": { + "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": {}, + "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-2": {} + } + }, + "subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0", + "tags": {} + } + }, + "201": { + "body": { + "name": "myFirstProvisioningService", + "type": "Microsoft.Devices/ProvisioningServices", + "etag": "AAAAAAAADGk=", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService", + "location": "eastus", + "properties": { + "allocationPolicy": "Hashed", + "authorizationPolicies": [], + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "enableDataResidency": false, + "idScope": "0ne00000012", + "portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net", + "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net", + "state": "Active", + "deviceRegistryNamespace": { + "resourceId": "/subscriptions/8c64812d-6e59-4e65-96b3-14a7cdb1a4e4/resourceGroups/myRg/providers/Microsoft.DeviceRegistry/namespaces/myNamespace", + "authenticationType": "UserAssigned", + "selectedUserAssignedIdentityResourceId": "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1" + } + }, + "resourcegroup": "myResourceGroup", + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "identity": { + "type": "SystemAssigned, UserAssigned", + "userAssignedIdentities": { + "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": {}, + "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-2": {} + } + }, + "subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0", + "tags": {} + } + } + }, + "operationId": "IotDpsResource_CreateOrUpdate", + "title": "DPSCreateWithNamespace" +} diff --git a/specification/deviceprovisioningservices/DeviceProvisioningServices.Management/models.tsp b/specification/deviceprovisioningservices/DeviceProvisioningServices.Management/models.tsp index af8983d327e0..14dae9ce667c 100644 --- a/specification/deviceprovisioningservices/DeviceProvisioningServices.Management/models.tsp +++ b/specification/deviceprovisioningservices/DeviceProvisioningServices.Management/models.tsp @@ -135,15 +135,19 @@ union PrivateLinkServiceConnectionStatus { } /** - * IotHub MI authentication type: KeyBased, UserAssigned, SystemAssigned. + * Device Registry Namespace MI authentication type: UserAssigned, SystemAssigned. */ -union IotHubAuthenticationType { +union DeviceRegistryNamespaceAuthenticationType { string, - #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" - KeyBased: "KeyBased", - #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + + /** + * User assigned authentication type. + */ UserAssigned: "UserAssigned", - #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + + /** + * System assigned authentication type. + */ SystemAssigned: "SystemAssigned", } @@ -351,6 +355,11 @@ model IotDpsPropertiesDescription { */ iotHubs?: IotHubDefinitionDescription[]; + /** + * The Device Registry namespace that is linked to the provisioning service. + */ + deviceRegistryNamespace?: DeviceRegistryNamespaceDescription; + /** * Allocation policy to be used by this provisioning service. */ @@ -487,20 +496,34 @@ model IotHubDefinitionDescription { /** * Connection string of the IoT hub. */ - connectionString?: string; + connectionString: string; /** * ARM region of the IoT hub. */ location: string; +} + +/** + * Description of the Device Registry namespace that is linked to the provisioning service. + */ +model DeviceRegistryNamespaceDescription { + /** + * The ARM resource ID of the Device Registry namespace. + */ + resourceId: Azure.Core.armResourceIdentifier<[ + { + type: "Microsoft.DeviceRegistry/namespaces"; + } + ]>; /** - * IotHub MI authentication type: KeyBased, UserAssigned, SystemAssigned. + * Device Registry Namespace MI authentication type: UserAssigned, SystemAssigned. */ - authenticationType?: IotHubAuthenticationType; + authenticationType: DeviceRegistryNamespaceAuthenticationType; /** - * The selected user-assigned identity resource Id associated with IoT Hub. This is required when authenticationType is UserAssigned. + * The selected user-assigned identity resource Id associated with Device Registry namespace. This is required when authenticationType is UserAssigned. */ selectedUserAssignedIdentityResourceId?: Azure.Core.armResourceIdentifier<[ { diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2025-02-01-preview/examples/DPSCreateWithNamespace.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2025-02-01-preview/examples/DPSCreateWithNamespace.json new file mode 100644 index 000000000000..a957cc575fa0 --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2025-02-01-preview/examples/DPSCreateWithNamespace.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2025-02-01-preview", + "iotDpsDescription": { + "location": "East US", + "properties": { + "enableDataResidency": false + }, + "sku": { + "name": "S1", + "capacity": 1 + }, + "tags": {} + }, + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "name": "myFirstProvisioningService", + "type": "Microsoft.Devices/ProvisioningServices", + "etag": "AAAAAAAADGk=", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService", + "location": "eastus", + "properties": { + "allocationPolicy": "Hashed", + "authorizationPolicies": [], + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "enableDataResidency": false, + "idScope": "0ne00000012", + "portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net", + "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net", + "state": "Active", + "deviceRegistryNamespace": { + "resourceId": "/subscriptions/8c64812d-6e59-4e65-96b3-14a7cdb1a4e4/resourceGroups/myRg/providers/Microsoft.DeviceRegistry/namespaces/myNamespace", + "authenticationType": "UserAssigned", + "selectedUserAssignedIdentityResourceId": "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1" + } + }, + "resourcegroup": "myResourceGroup", + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "identity": { + "type": "SystemAssigned, UserAssigned", + "userAssignedIdentities": { + "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": {}, + "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-2": {} + } + }, + "subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0", + "tags": {} + } + }, + "201": { + "body": { + "name": "myFirstProvisioningService", + "type": "Microsoft.Devices/ProvisioningServices", + "etag": "AAAAAAAADGk=", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService", + "location": "eastus", + "properties": { + "allocationPolicy": "Hashed", + "authorizationPolicies": [], + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "enableDataResidency": false, + "idScope": "0ne00000012", + "portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net", + "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net", + "state": "Active", + "deviceRegistryNamespace": { + "resourceId": "/subscriptions/8c64812d-6e59-4e65-96b3-14a7cdb1a4e4/resourceGroups/myRg/providers/Microsoft.DeviceRegistry/namespaces/myNamespace", + "authenticationType": "UserAssigned", + "selectedUserAssignedIdentityResourceId": "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1" + } + }, + "resourcegroup": "myResourceGroup", + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "identity": { + "type": "SystemAssigned, UserAssigned", + "userAssignedIdentities": { + "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": {}, + "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-2": {} + } + }, + "subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0", + "tags": {} + } + } + }, + "operationId": "IotDpsResource_CreateOrUpdate", + "title": "DPSCreateWithNamespace" +} diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2025-02-01-preview/iotdps.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2025-02-01-preview/iotdps.json index 4f98aab1e42e..6b569e8e4962 100644 --- a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2025-02-01-preview/iotdps.json +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2025-02-01-preview/iotdps.json @@ -329,6 +329,9 @@ "DPSCreate": { "$ref": "./examples/DPSCreate.json" }, + "DPSCreateWithNamespace": { + "$ref": "./examples/DPSCreateWithNamespace.json" + }, "DPSUpdate": { "$ref": "./examples/DPSUpdate.json" } @@ -1808,6 +1811,68 @@ } ] }, + "DeviceRegistryNamespaceAuthenticationType": { + "type": "string", + "description": "Device Registry Namespace MI authentication type: UserAssigned, SystemAssigned.", + "enum": [ + "UserAssigned", + "SystemAssigned" + ], + "x-ms-enum": { + "name": "DeviceRegistryNamespaceAuthenticationType", + "modelAsString": true, + "values": [ + { + "name": "UserAssigned", + "value": "UserAssigned", + "description": "User assigned authentication type." + }, + { + "name": "SystemAssigned", + "value": "SystemAssigned", + "description": "System assigned authentication type." + } + ] + } + }, + "DeviceRegistryNamespaceDescription": { + "type": "object", + "description": "Description of the Device Registry namespace that is linked to the provisioning service.", + "properties": { + "resourceId": { + "type": "string", + "format": "arm-id", + "description": "The ARM resource ID of the Device Registry namespace.", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.DeviceRegistry/namespaces" + } + ] + } + }, + "authenticationType": { + "$ref": "#/definitions/DeviceRegistryNamespaceAuthenticationType", + "description": "Device Registry Namespace MI authentication type: UserAssigned, SystemAssigned." + }, + "selectedUserAssignedIdentityResourceId": { + "type": "string", + "format": "arm-id", + "description": "The selected user-assigned identity resource Id associated with Device Registry namespace. This is required when authenticationType is UserAssigned.", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.ManagedIdentity/userAssignedIdentities" + } + ] + } + } + }, + "required": [ + "resourceId", + "authenticationType" + ] + }, "ErrorDetails": { "type": "object", "description": "Error details.", @@ -1932,6 +1997,10 @@ "$ref": "#/definitions/IotHubDefinitionDescription" } }, + "deviceRegistryNamespace": { + "$ref": "#/definitions/DeviceRegistryNamespaceDescription", + "description": "The Device Registry namespace that is linked to the provisioning service." + }, "allocationPolicy": { "$ref": "#/definitions/AllocationPolicy", "description": "Allocation policy to be used by this provisioning service." @@ -2036,33 +2105,6 @@ } } }, - "IotHubAuthenticationType": { - "type": "string", - "description": "IotHub MI authentication type: KeyBased, UserAssigned, SystemAssigned.", - "enum": [ - "KeyBased", - "UserAssigned", - "SystemAssigned" - ], - "x-ms-enum": { - "name": "IotHubAuthenticationType", - "modelAsString": true, - "values": [ - { - "name": "KeyBased", - "value": "KeyBased" - }, - { - "name": "UserAssigned", - "value": "UserAssigned" - }, - { - "name": "SystemAssigned", - "value": "SystemAssigned" - } - ] - } - }, "IotHubDefinitionDescription": { "type": "object", "description": "Description of the IoT hub.", @@ -2088,25 +2130,10 @@ "location": { "type": "string", "description": "ARM region of the IoT hub." - }, - "authenticationType": { - "$ref": "#/definitions/IotHubAuthenticationType", - "description": "IotHub MI authentication type: KeyBased, UserAssigned, SystemAssigned." - }, - "selectedUserAssignedIdentityResourceId": { - "type": "string", - "format": "arm-id", - "description": "The selected user-assigned identity resource Id associated with IoT Hub. This is required when authenticationType is UserAssigned.", - "x-ms-arm-id-details": { - "allowedResources": [ - { - "type": "Microsoft.ManagedIdentity/userAssignedIdentities" - } - ] - } } }, "required": [ + "connectionString", "location" ] },