Bicep resource definition
The namespaces/devices resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.DeviceRegistry/namespaces/devices resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.DeviceRegistry/namespaces/devices@2025-11-01-preview' = {
parent: resourceSymbolicName
extendedLocation: {
name: 'string'
type: 'string'
}
location: 'string'
name: 'string'
properties: {
attributes: {
{customized property}: any(...)
}
discoveredDeviceRef: 'string'
enabled: bool
endpoints: {
inbound: {
{customized property}: {
additionalConfiguration: 'string'
address: 'string'
authentication: {
method: 'string'
usernamePasswordCredentials: {
passwordSecretName: 'string'
usernameSecretName: 'string'
}
x509Credentials: {
certificateSecretName: 'string'
intermediateCertificatesSecretName: 'string'
keySecretName: 'string'
}
}
endpointType: 'string'
trustSettings: {
trustList: 'string'
}
version: 'string'
}
}
outbound: {
assigned: {
{customized property}: {
address: 'string'
endpointType: 'string'
}
}
unassigned: {
{customized property}: {
address: 'string'
endpointType: 'string'
}
}
}
}
externalDeviceId: 'string'
manufacturer: 'string'
model: 'string'
operatingSystem: 'string'
operatingSystemVersion: 'string'
policy: {
resourceId: 'string'
}
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.DeviceRegistry/namespaces/devices
| Name |
Description |
Value |
| extendedLocation |
The extended location. |
ExtendedLocation |
| location |
The geo-location where the resource lives |
string (required) |
| name |
The resource name |
string
Constraints: Min length = 3 Max length = 63 Pattern = ^[0-9a-zA-Z][a-zA-Z0-9-]*$ (required) |
| parent |
In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.
For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: namespaces |
| properties |
The resource-specific properties for this resource. |
NamespaceDeviceProperties |
| tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
DeviceCredentialPolicy
| Name |
Description |
Value |
| resourceId |
Resource Id of the Policy. |
string |
DeviceMessagingEndpoint
| Name |
Description |
Value |
| address |
The endpoint address to connect to. |
string (required) |
| endpointType |
Type of connection used for the messaging endpoint. |
string |
ExtendedLocation
| Name |
Description |
Value |
| name |
The extended location name. |
string (required) |
| type |
The extended location type. |
string (required) |
HostAuthentication
| Name |
Description |
Value |
| method |
Defines the method to authenticate the user of the client at the server. |
'Anonymous' 'Certificate' 'UsernamePassword' (required) |
| usernamePasswordCredentials |
Defines the username and password references when UsernamePassword user authentication mode is selected. |
UsernamePasswordCredentials |
| x509Credentials |
Defines the certificate reference when Certificate user authentication mode is selected. |
X509CertificateCredentials |
InboundEndpoints
| Name |
Description |
Value |
| additionalConfiguration |
Stringified JSON that contains configuration to be used by the connector (e.g., OPC UA, ONVIF). |
string |
| address |
The endpoint address & port. This can be either an IP address (e.g., 192.168.1.1) or a fully qualified domain name (FQDN, e.g., server.example.com). |
string (required) |
| authentication |
Defines the client authentication mechanism to the server. |
HostAuthentication |
| endpointType |
Type of connection endpoint. |
string (required) |
| trustSettings |
Defines server trust settings for the endpoint. |
TrustSettings |
| version |
Protocol version associated with the endpoint e.g. 1 or 2 for endpointType Microsoft.HTTP, and 3.5 or 5.0 for endpointType Microsoft.Mqtt etc. |
string |
MessagingEndpoints
MessagingEndpointsInbound
NamespaceDeviceProperties
| Name |
Description |
Value |
| attributes |
A set of key-value pairs that contain custom attributes set by the customer. |
NamespaceDevicePropertiesAttributes |
| discoveredDeviceRef |
Reference to a device. Populated only if the device had been created from discovery flow. Discovered device name must be provided. |
string |
| enabled |
Indicates if the resource is enabled or not. |
bool |
| endpoints |
Property bag containing the device's unassigned and assigned endpoints. |
MessagingEndpoints |
| externalDeviceId |
The Device ID provided by the customer. |
string |
| manufacturer |
Device manufacturer. |
string |
| model |
Device model. |
string |
| operatingSystem |
Device operating system. |
string |
| operatingSystemVersion |
Device operating system version. |
string |
| policy |
Policy used to issue device certificates. |
DeviceCredentialPolicy |
NamespaceDevicePropertiesAttributes
OutboundEndpoints
OutboundEndpointsAssigned
OutboundEndpointsUnassigned
TrustSettings
| Name |
Description |
Value |
| trustList |
Defines a secret reference for certificates to trust. |
string |
UsernamePasswordCredentials
| Name |
Description |
Value |
| passwordSecretName |
The name of the secret containing the password. |
string (required) |
| usernameSecretName |
The name of the secret containing the username. |
string (required) |
X509CertificateCredentials
| Name |
Description |
Value |
| certificateSecretName |
The name of the secret containing the certificate and private key (e.g. stored as .der/.pem or .der/.pfx). |
string (required) |
| intermediateCertificatesSecretName |
The name of the secret containing the combined intermediate certificates in PEM format. |
string |
| keySecretName |
The name of the secret containing the certificate private key in PEM or DER format. |
string |
ARM template resource definition
The namespaces/devices resource type can be deployed with operations that target:
Usage Examples
To create a Microsoft.DeviceRegistry/namespaces/devices resource, add the following JSON to your template.
{
"type": "Microsoft.DeviceRegistry/namespaces/devices",
"apiVersion": "2025-11-01-preview",
"name": "string",
"extendedLocation": {
"name": "string",
"type": "string"
},
"location": "string",
"properties": {
"attributes": {
"{customized property}": {}
},
"discoveredDeviceRef": "string",
"enabled": "bool",
"endpoints": {
"inbound": {
"{customized property}": {
"additionalConfiguration": "string",
"address": "string",
"authentication": {
"method": "string",
"usernamePasswordCredentials": {
"passwordSecretName": "string",
"usernameSecretName": "string"
},
"x509Credentials": {
"certificateSecretName": "string",
"intermediateCertificatesSecretName": "string",
"keySecretName": "string"
}
},
"endpointType": "string",
"trustSettings": {
"trustList": "string"
},
"version": "string"
}
},
"outbound": {
"assigned": {
"{customized property}": {
"address": "string",
"endpointType": "string"
}
},
"unassigned": {
"{customized property}": {
"address": "string",
"endpointType": "string"
}
}
}
},
"externalDeviceId": "string",
"manufacturer": "string",
"model": "string",
"operatingSystem": "string",
"operatingSystemVersion": "string",
"policy": {
"resourceId": "string"
}
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.DeviceRegistry/namespaces/devices
| Name |
Description |
Value |
| apiVersion |
The api version |
'2025-11-01-preview' |
| extendedLocation |
The extended location. |
ExtendedLocation |
| location |
The geo-location where the resource lives |
string (required) |
| name |
The resource name |
string
Constraints: Min length = 3 Max length = 63 Pattern = ^[0-9a-zA-Z][a-zA-Z0-9-]*$ (required) |
| properties |
The resource-specific properties for this resource. |
NamespaceDeviceProperties |
| tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
| type |
The resource type |
'Microsoft.DeviceRegistry/namespaces/devices' |
DeviceCredentialPolicy
| Name |
Description |
Value |
| resourceId |
Resource Id of the Policy. |
string |
DeviceMessagingEndpoint
| Name |
Description |
Value |
| address |
The endpoint address to connect to. |
string (required) |
| endpointType |
Type of connection used for the messaging endpoint. |
string |
ExtendedLocation
| Name |
Description |
Value |
| name |
The extended location name. |
string (required) |
| type |
The extended location type. |
string (required) |
HostAuthentication
| Name |
Description |
Value |
| method |
Defines the method to authenticate the user of the client at the server. |
'Anonymous' 'Certificate' 'UsernamePassword' (required) |
| usernamePasswordCredentials |
Defines the username and password references when UsernamePassword user authentication mode is selected. |
UsernamePasswordCredentials |
| x509Credentials |
Defines the certificate reference when Certificate user authentication mode is selected. |
X509CertificateCredentials |
InboundEndpoints
| Name |
Description |
Value |
| additionalConfiguration |
Stringified JSON that contains configuration to be used by the connector (e.g., OPC UA, ONVIF). |
string |
| address |
The endpoint address & port. This can be either an IP address (e.g., 192.168.1.1) or a fully qualified domain name (FQDN, e.g., server.example.com). |
string (required) |
| authentication |
Defines the client authentication mechanism to the server. |
HostAuthentication |
| endpointType |
Type of connection endpoint. |
string (required) |
| trustSettings |
Defines server trust settings for the endpoint. |
TrustSettings |
| version |
Protocol version associated with the endpoint e.g. 1 or 2 for endpointType Microsoft.HTTP, and 3.5 or 5.0 for endpointType Microsoft.Mqtt etc. |
string |
MessagingEndpoints
MessagingEndpointsInbound
NamespaceDeviceProperties
| Name |
Description |
Value |
| attributes |
A set of key-value pairs that contain custom attributes set by the customer. |
NamespaceDevicePropertiesAttributes |
| discoveredDeviceRef |
Reference to a device. Populated only if the device had been created from discovery flow. Discovered device name must be provided. |
string |
| enabled |
Indicates if the resource is enabled or not. |
bool |
| endpoints |
Property bag containing the device's unassigned and assigned endpoints. |
MessagingEndpoints |
| externalDeviceId |
The Device ID provided by the customer. |
string |
| manufacturer |
Device manufacturer. |
string |
| model |
Device model. |
string |
| operatingSystem |
Device operating system. |
string |
| operatingSystemVersion |
Device operating system version. |
string |
| policy |
Policy used to issue device certificates. |
DeviceCredentialPolicy |
NamespaceDevicePropertiesAttributes
OutboundEndpoints
OutboundEndpointsAssigned
OutboundEndpointsUnassigned
TrustSettings
| Name |
Description |
Value |
| trustList |
Defines a secret reference for certificates to trust. |
string |
UsernamePasswordCredentials
| Name |
Description |
Value |
| passwordSecretName |
The name of the secret containing the password. |
string (required) |
| usernameSecretName |
The name of the secret containing the username. |
string (required) |
X509CertificateCredentials
| Name |
Description |
Value |
| certificateSecretName |
The name of the secret containing the certificate and private key (e.g. stored as .der/.pem or .der/.pfx). |
string (required) |
| intermediateCertificatesSecretName |
The name of the secret containing the combined intermediate certificates in PEM format. |
string |
| keySecretName |
The name of the secret containing the certificate private key in PEM or DER format. |
string |
The namespaces/devices resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
To create a Microsoft.DeviceRegistry/namespaces/devices resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DeviceRegistry/namespaces/devices@2025-11-01-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
extendedLocation = {
name = "string"
type = "string"
}
properties = {
attributes = {
{customized property} = ?
}
discoveredDeviceRef = "string"
enabled = bool
endpoints = {
inbound = {
{customized property} = {
additionalConfiguration = "string"
address = "string"
authentication = {
method = "string"
usernamePasswordCredentials = {
passwordSecretName = "string"
usernameSecretName = "string"
}
x509Credentials = {
certificateSecretName = "string"
intermediateCertificatesSecretName = "string"
keySecretName = "string"
}
}
endpointType = "string"
trustSettings = {
trustList = "string"
}
version = "string"
}
}
outbound = {
assigned = {
{customized property} = {
address = "string"
endpointType = "string"
}
}
unassigned = {
{customized property} = {
address = "string"
endpointType = "string"
}
}
}
}
externalDeviceId = "string"
manufacturer = "string"
model = "string"
operatingSystem = "string"
operatingSystemVersion = "string"
policy = {
resourceId = "string"
}
}
}
}
Property Values
Microsoft.DeviceRegistry/namespaces/devices
| Name |
Description |
Value |
| extendedLocation |
The extended location. |
ExtendedLocation |
| location |
The geo-location where the resource lives |
string (required) |
| name |
The resource name |
string
Constraints: Min length = 3 Max length = 63 Pattern = ^[0-9a-zA-Z][a-zA-Z0-9-]*$ (required) |
| parent_id |
The ID of the resource that is the parent for this resource. |
ID for resource of type: namespaces |
| properties |
The resource-specific properties for this resource. |
NamespaceDeviceProperties |
| tags |
Resource tags |
Dictionary of tag names and values. |
| type |
The resource type |
"Microsoft.DeviceRegistry/namespaces/devices@2025-11-01-preview" |
DeviceCredentialPolicy
| Name |
Description |
Value |
| resourceId |
Resource Id of the Policy. |
string |
DeviceMessagingEndpoint
| Name |
Description |
Value |
| address |
The endpoint address to connect to. |
string (required) |
| endpointType |
Type of connection used for the messaging endpoint. |
string |
ExtendedLocation
| Name |
Description |
Value |
| name |
The extended location name. |
string (required) |
| type |
The extended location type. |
string (required) |
HostAuthentication
| Name |
Description |
Value |
| method |
Defines the method to authenticate the user of the client at the server. |
'Anonymous' 'Certificate' 'UsernamePassword' (required) |
| usernamePasswordCredentials |
Defines the username and password references when UsernamePassword user authentication mode is selected. |
UsernamePasswordCredentials |
| x509Credentials |
Defines the certificate reference when Certificate user authentication mode is selected. |
X509CertificateCredentials |
InboundEndpoints
| Name |
Description |
Value |
| additionalConfiguration |
Stringified JSON that contains configuration to be used by the connector (e.g., OPC UA, ONVIF). |
string |
| address |
The endpoint address & port. This can be either an IP address (e.g., 192.168.1.1) or a fully qualified domain name (FQDN, e.g., server.example.com). |
string (required) |
| authentication |
Defines the client authentication mechanism to the server. |
HostAuthentication |
| endpointType |
Type of connection endpoint. |
string (required) |
| trustSettings |
Defines server trust settings for the endpoint. |
TrustSettings |
| version |
Protocol version associated with the endpoint e.g. 1 or 2 for endpointType Microsoft.HTTP, and 3.5 or 5.0 for endpointType Microsoft.Mqtt etc. |
string |
MessagingEndpoints
MessagingEndpointsInbound
NamespaceDeviceProperties
| Name |
Description |
Value |
| attributes |
A set of key-value pairs that contain custom attributes set by the customer. |
NamespaceDevicePropertiesAttributes |
| discoveredDeviceRef |
Reference to a device. Populated only if the device had been created from discovery flow. Discovered device name must be provided. |
string |
| enabled |
Indicates if the resource is enabled or not. |
bool |
| endpoints |
Property bag containing the device's unassigned and assigned endpoints. |
MessagingEndpoints |
| externalDeviceId |
The Device ID provided by the customer. |
string |
| manufacturer |
Device manufacturer. |
string |
| model |
Device model. |
string |
| operatingSystem |
Device operating system. |
string |
| operatingSystemVersion |
Device operating system version. |
string |
| policy |
Policy used to issue device certificates. |
DeviceCredentialPolicy |
NamespaceDevicePropertiesAttributes
OutboundEndpoints
OutboundEndpointsAssigned
OutboundEndpointsUnassigned
TrustSettings
| Name |
Description |
Value |
| trustList |
Defines a secret reference for certificates to trust. |
string |
UsernamePasswordCredentials
| Name |
Description |
Value |
| passwordSecretName |
The name of the secret containing the password. |
string (required) |
| usernameSecretName |
The name of the secret containing the username. |
string (required) |
X509CertificateCredentials
| Name |
Description |
Value |
| certificateSecretName |
The name of the secret containing the certificate and private key (e.g. stored as .der/.pem or .der/.pfx). |
string (required) |
| intermediateCertificatesSecretName |
The name of the secret containing the combined intermediate certificates in PEM format. |
string |
| keySecretName |
The name of the secret containing the certificate private key in PEM or DER format. |
string |