Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The digitalTwinsInstances resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DigitalTwins/digitalTwinsInstances resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.DigitalTwins/digitalTwinsInstances@2023-01-31' = {
identity: {
type: 'string'
userAssignedIdentities: {
{customized property}: {}
}
}
location: 'string'
name: 'string'
properties: {
privateEndpointConnections: [
{
properties: {
groupIds: [
'string'
]
privateEndpoint: {}
privateLinkServiceConnectionState: {
actionsRequired: 'string'
description: 'string'
status: 'string'
}
}
}
]
publicNetworkAccess: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.DigitalTwins/digitalTwinsInstances
| Name | Description | Value |
|---|---|---|
| identity | The managed identity for the DigitalTwinsInstance. | DigitalTwinsIdentity |
| location | The resource location. | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 63 Pattern = ^(?!-)[A-Za-z0-9-]{3,63}(?<!-)$ (required) |
| properties | DigitalTwins instance properties. | DigitalTwinsProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ConnectionProperties
| Name | Description | Value |
|---|---|---|
| groupIds | The list of group ids for the private endpoint connection. | string[] |
| privateEndpoint | The private endpoint. | PrivateEndpoint |
| privateLinkServiceConnectionState | The connection state. | ConnectionPropertiesPrivateLinkServiceConnectionState |
ConnectionPropertiesPrivateLinkServiceConnectionState
| Name | Description | Value |
|---|---|---|
| actionsRequired | Actions required for a private endpoint connection. | string |
| description | The description for the current state of a private endpoint connection. | string (required) |
| status | The status of a private endpoint connection. | 'Approved' 'Disconnected' 'Pending' 'Rejected' (required) |
DigitalTwinsIdentity
| Name | Description | Value |
|---|---|---|
| type | The type of Managed Identity used by the DigitalTwinsInstance. | 'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' 'UserAssigned' |
| userAssignedIdentities | The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. . |
DigitalTwinsIdentityUserAssignedIdentities |
DigitalTwinsIdentityUserAssignedIdentities
| Name | Description | Value |
|---|
DigitalTwinsProperties
| Name | Description | Value |
|---|---|---|
| privateEndpointConnections | The private endpoint connections. | PrivateEndpointConnection[] |
| publicNetworkAccess | Public network access for the DigitalTwinsInstance. | 'Disabled' 'Enabled' |
DigitalTwinsResourceTags
| Name | Description | Value |
|---|
PrivateEndpoint
| Name | Description | Value |
|---|
PrivateEndpointConnection
| Name | Description | Value |
|---|---|---|
| properties | The connection properties. | ConnectionProperties (required) |
UserAssignedIdentity
| Name | Description | Value |
|---|
Usage Examples
Bicep Samples
A basic example of deploying Digital Twins instance.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource digitalTwinsInstance 'Microsoft.DigitalTwins/digitalTwinsInstances@2020-12-01' = {
name: resourceName
location: location
}
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
| Module | Description |
|---|---|
| Digital Twins Instance | AVM Resource Module for Digital Twins Instance |
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
| Bicep File | Description |
|---|---|
| Azure Digital Twins with Function and Private Link service | This template creates an Azure Digital Twins service configured with a Virtual Network connected Azure Function that can communicate through a Private Link Endpoint to Digital Twins. It also creates a Private DNS Zone to allow seamless hostname resolution of the Digital Twins Endpoint from the Virtual Network to the Private Endpoint internal subnet IP address. The hostname is stored as a setting to the Azure Function with name 'ADT_ENDPOINT'. |
| Azure Digital Twins with Time Data History Connection | This template creates an Azure Digital Twins instance configured with a time series data history connection. In order to create a connection, other resources must be created such as an Event Hubs namespace, an event hub, Azure Data Explorer cluster, and a database. Data is sent to an event hub which eventually forwards the data to the Azure Data Explorer cluster. Data is stored in a database table in the cluster |
ARM template resource definition
The digitalTwinsInstances resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DigitalTwins/digitalTwinsInstances resource, add the following JSON to your template.
{
"type": "Microsoft.DigitalTwins/digitalTwinsInstances",
"apiVersion": "2023-01-31",
"name": "string",
"identity": {
"type": "string",
"userAssignedIdentities": {
"{customized property}": {
}
}
},
"location": "string",
"properties": {
"privateEndpointConnections": [
{
"properties": {
"groupIds": [ "string" ],
"privateEndpoint": {
},
"privateLinkServiceConnectionState": {
"actionsRequired": "string",
"description": "string",
"status": "string"
}
}
}
],
"publicNetworkAccess": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.DigitalTwins/digitalTwinsInstances
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2023-01-31' |
| identity | The managed identity for the DigitalTwinsInstance. | DigitalTwinsIdentity |
| location | The resource location. | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 63 Pattern = ^(?!-)[A-Za-z0-9-]{3,63}(?<!-)$ (required) |
| properties | DigitalTwins instance properties. | DigitalTwinsProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.DigitalTwins/digitalTwinsInstances' |
ConnectionProperties
| Name | Description | Value |
|---|---|---|
| groupIds | The list of group ids for the private endpoint connection. | string[] |
| privateEndpoint | The private endpoint. | PrivateEndpoint |
| privateLinkServiceConnectionState | The connection state. | ConnectionPropertiesPrivateLinkServiceConnectionState |
ConnectionPropertiesPrivateLinkServiceConnectionState
| Name | Description | Value |
|---|---|---|
| actionsRequired | Actions required for a private endpoint connection. | string |
| description | The description for the current state of a private endpoint connection. | string (required) |
| status | The status of a private endpoint connection. | 'Approved' 'Disconnected' 'Pending' 'Rejected' (required) |
DigitalTwinsIdentity
| Name | Description | Value |
|---|---|---|
| type | The type of Managed Identity used by the DigitalTwinsInstance. | 'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' 'UserAssigned' |
| userAssignedIdentities | The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. . |
DigitalTwinsIdentityUserAssignedIdentities |
DigitalTwinsIdentityUserAssignedIdentities
| Name | Description | Value |
|---|
DigitalTwinsProperties
| Name | Description | Value |
|---|---|---|
| privateEndpointConnections | The private endpoint connections. | PrivateEndpointConnection[] |
| publicNetworkAccess | Public network access for the DigitalTwinsInstance. | 'Disabled' 'Enabled' |
DigitalTwinsResourceTags
| Name | Description | Value |
|---|
PrivateEndpoint
| Name | Description | Value |
|---|
PrivateEndpointConnection
| Name | Description | Value |
|---|---|---|
| properties | The connection properties. | ConnectionProperties (required) |
UserAssignedIdentity
| Name | Description | Value |
|---|
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Azure Digital Twins with Function and Private Link service |
This template creates an Azure Digital Twins service configured with a Virtual Network connected Azure Function that can communicate through a Private Link Endpoint to Digital Twins. It also creates a Private DNS Zone to allow seamless hostname resolution of the Digital Twins Endpoint from the Virtual Network to the Private Endpoint internal subnet IP address. The hostname is stored as a setting to the Azure Function with name 'ADT_ENDPOINT'. |
| Azure Digital Twins with Time Data History Connection |
This template creates an Azure Digital Twins instance configured with a time series data history connection. In order to create a connection, other resources must be created such as an Event Hubs namespace, an event hub, Azure Data Explorer cluster, and a database. Data is sent to an event hub which eventually forwards the data to the Azure Data Explorer cluster. Data is stored in a database table in the cluster |
Terraform (AzAPI provider) resource definition
The digitalTwinsInstances 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.DigitalTwins/digitalTwinsInstances resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DigitalTwins/digitalTwinsInstances@2023-01-31"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
privateEndpointConnections = [
{
properties = {
groupIds = [
"string"
]
privateEndpoint = {
}
privateLinkServiceConnectionState = {
actionsRequired = "string"
description = "string"
status = "string"
}
}
}
]
publicNetworkAccess = "string"
}
}
}
Property Values
Microsoft.DigitalTwins/digitalTwinsInstances
| Name | Description | Value |
|---|---|---|
| identity | The managed identity for the DigitalTwinsInstance. | DigitalTwinsIdentity |
| location | The resource location. | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 63 Pattern = ^(?!-)[A-Za-z0-9-]{3,63}(?<!-)$ (required) |
| properties | DigitalTwins instance properties. | DigitalTwinsProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.DigitalTwins/digitalTwinsInstances@2023-01-31" |
ConnectionProperties
| Name | Description | Value |
|---|---|---|
| groupIds | The list of group ids for the private endpoint connection. | string[] |
| privateEndpoint | The private endpoint. | PrivateEndpoint |
| privateLinkServiceConnectionState | The connection state. | ConnectionPropertiesPrivateLinkServiceConnectionState |
ConnectionPropertiesPrivateLinkServiceConnectionState
| Name | Description | Value |
|---|---|---|
| actionsRequired | Actions required for a private endpoint connection. | string |
| description | The description for the current state of a private endpoint connection. | string (required) |
| status | The status of a private endpoint connection. | 'Approved' 'Disconnected' 'Pending' 'Rejected' (required) |
DigitalTwinsIdentity
| Name | Description | Value |
|---|---|---|
| type | The type of Managed Identity used by the DigitalTwinsInstance. | 'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' 'UserAssigned' |
| userAssignedIdentities | The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. . |
DigitalTwinsIdentityUserAssignedIdentities |
DigitalTwinsIdentityUserAssignedIdentities
| Name | Description | Value |
|---|
DigitalTwinsProperties
| Name | Description | Value |
|---|---|---|
| privateEndpointConnections | The private endpoint connections. | PrivateEndpointConnection[] |
| publicNetworkAccess | Public network access for the DigitalTwinsInstance. | 'Disabled' 'Enabled' |
DigitalTwinsResourceTags
| Name | Description | Value |
|---|
PrivateEndpoint
| Name | Description | Value |
|---|
PrivateEndpointConnection
| Name | Description | Value |
|---|---|---|
| properties | The connection properties. | ConnectionProperties (required) |
UserAssignedIdentity
| Name | Description | Value |
|---|
Usage Examples
Terraform Samples
A basic example of deploying Digital Twins instance.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "digitalTwinsInstance" {
type = "Microsoft.DigitalTwins/digitalTwinsInstances@2020-12-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
identity {
type = "SystemAssigned"
identity_ids = []
}
body = {
}
schema_validation_enabled = false
response_export_values = ["*"]
}