Microsoft.DeviceRegistry namespaces/credentials/policies

Bicep resource definition

The namespaces/credentials/policies resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DeviceRegistry/namespaces/credentials/policies resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.DeviceRegistry/namespaces/credentials/policies@2026-03-01-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    certificate: {
      certificateAuthorityConfiguration: {
        bringYourOwnRoot: {
          enabled: bool
        }
        keyType: 'string'
      }
      leafCertificateConfiguration: {
        validityPeriodInDays: int
      }
    }
  }
}

Property Values

Microsoft.DeviceRegistry/namespaces/credentials/policies

Name Description Value
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/credentials
properties The resource-specific properties for this resource. PolicyProperties

BringYourOwnRoot

Name Description Value
enabled Indicates whether Bring Your Own Root is enabled. This can only be set at creation time and cannot be changed afterward. bool (required)

CertificateAuthorityConfiguration

Name Description Value
bringYourOwnRoot Configuration for Bring Your Own Root. BringYourOwnRoot
keyType Crypto type: ECC. 'ECC' (required)

CertificateConfiguration

Name Description Value
certificateAuthorityConfiguration The configuration to set up an ICA. CertificateAuthorityConfiguration (required)
leafCertificateConfiguration The leaf certificate configuration. LeafCertificateConfiguration (required)

LeafCertificateConfiguration

Name Description Value
validityPeriodInDays The validity period in days. int

Constraints:
Min value = 7
Max value = 90 (required)

PolicyProperties

Name Description Value
certificate The certificate configuration. CertificateConfiguration

ARM template resource definition

The namespaces/credentials/policies resource type can be deployed with operations that target:

Usage Examples

Resource format

To create a Microsoft.DeviceRegistry/namespaces/credentials/policies resource, add the following JSON to your template.

{
  "type": "Microsoft.DeviceRegistry/namespaces/credentials/policies",
  "apiVersion": "2026-03-01-preview",
  "name": "string",
  "properties": {
    "certificate": {
      "certificateAuthorityConfiguration": {
        "bringYourOwnRoot": {
          "enabled": "bool"
        },
        "keyType": "string"
      },
      "leafCertificateConfiguration": {
        "validityPeriodInDays": "int"
      }
    }
  }
}

Property Values

Microsoft.DeviceRegistry/namespaces/credentials/policies

Name Description Value
apiVersion The api version '2026-03-01-preview'
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. PolicyProperties
type The resource type 'Microsoft.DeviceRegistry/namespaces/credentials/policies'

BringYourOwnRoot

Name Description Value
enabled Indicates whether Bring Your Own Root is enabled. This can only be set at creation time and cannot be changed afterward. bool (required)

CertificateAuthorityConfiguration

Name Description Value
bringYourOwnRoot Configuration for Bring Your Own Root. BringYourOwnRoot
keyType Crypto type: ECC. 'ECC' (required)

CertificateConfiguration

Name Description Value
certificateAuthorityConfiguration The configuration to set up an ICA. CertificateAuthorityConfiguration (required)
leafCertificateConfiguration The leaf certificate configuration. LeafCertificateConfiguration (required)

LeafCertificateConfiguration

Name Description Value
validityPeriodInDays The validity period in days. int

Constraints:
Min value = 7
Max value = 90 (required)

PolicyProperties

Name Description Value
certificate The certificate configuration. CertificateConfiguration

Terraform (AzAPI provider) resource definition

The namespaces/credentials/policies resource type can be deployed with operations that target:

  • Resource groups For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DeviceRegistry/namespaces/credentials/policies resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DeviceRegistry/namespaces/credentials/policies@2026-03-01-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      certificate = {
        certificateAuthorityConfiguration = {
          bringYourOwnRoot = {
            enabled = bool
          }
          keyType = "string"
        }
        leafCertificateConfiguration = {
          validityPeriodInDays = int
        }
      }
    }
  }
}

Property Values

Microsoft.DeviceRegistry/namespaces/credentials/policies

Name Description Value
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/credentials
properties The resource-specific properties for this resource. PolicyProperties
type The resource type "Microsoft.DeviceRegistry/namespaces/credentials/policies@2026-03-01-preview"

BringYourOwnRoot

Name Description Value
enabled Indicates whether Bring Your Own Root is enabled. This can only be set at creation time and cannot be changed afterward. bool (required)

CertificateAuthorityConfiguration

Name Description Value
bringYourOwnRoot Configuration for Bring Your Own Root. BringYourOwnRoot
keyType Crypto type: ECC. 'ECC' (required)

CertificateConfiguration

Name Description Value
certificateAuthorityConfiguration The configuration to set up an ICA. CertificateAuthorityConfiguration (required)
leafCertificateConfiguration The leaf certificate configuration. LeafCertificateConfiguration (required)

LeafCertificateConfiguration

Name Description Value
validityPeriodInDays The validity period in days. int

Constraints:
Min value = 7
Max value = 90 (required)

PolicyProperties

Name Description Value
certificate The certificate configuration. CertificateConfiguration