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 accounts/instances 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.DeviceUpdate/accounts/instances resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.DeviceUpdate/accounts/instances@2023-07-01' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
diagnosticStorageProperties: {
authenticationType: 'string'
connectionString: 'string'
resourceId: 'string'
}
enableDiagnostics: bool
iotHubs: [
{
resourceId: 'string'
}
]
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.DeviceUpdate/accounts/instances
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 36 Pattern = ^[A-Za-z0-9]+(-[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: accounts |
| properties | Device Update instance properties. | InstanceProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
DiagnosticStorageProperties
| Name | Description | Value |
|---|---|---|
| authenticationType | Authentication Type | 'KeyBased' (required) |
| connectionString | ConnectionString of the diagnostic storage account | string Constraints: Sensitive value. Pass in as a secure parameter. |
| resourceId | ResourceId of the diagnostic storage account | string (required) |
InstanceProperties
| Name | Description | Value |
|---|---|---|
| diagnosticStorageProperties | Customer-initiated diagnostic log collection storage properties | DiagnosticStorageProperties |
| enableDiagnostics | Enables or Disables the diagnostic logs collection | bool |
| iotHubs | List of IoT Hubs associated with the account. | IotHubSettings[] |
IotHubSettings
| Name | Description | Value |
|---|---|---|
| resourceId | IoTHub resource ID | string Constraints: Min length = 108 Max length = 244 (required) |
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Bicep Samples
A basic example of deploying IoT Hub Device Update Instance.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource iotHub 'Microsoft.Devices/IotHubs@2022-04-30-preview' = {
name: resourceName
location: location
sku: {
capacity: 1
name: 'S1'
}
properties: {
cloudToDevice: {}
enableFileUploadNotifications: false
messagingEndpoints: {}
routing: {
fallbackRoute: {
condition: 'true'
endpointNames: [
'events'
]
isEnabled: true
source: 'DeviceMessages'
}
}
storageEndpoints: {}
}
}
resource account 'Microsoft.DeviceUpdate/accounts@2022-10-01' = {
name: resourceName
location: location
properties: {
publicNetworkAccess: 'Enabled'
sku: 'Standard'
}
}
resource instance 'Microsoft.DeviceUpdate/accounts/instances@2022-10-01' = {
name: resourceName
location: location
parent: account
properties: {
accountName: account.name
enableDiagnostics: false
iotHubs: [
{
resourceId: iotHub.id
}
]
}
}
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
| Bicep File | Description |
|---|---|
| Create Device Update for IoT Hub account, instance, IoT Hub | This template creates an account, and an instance and a hub to link the instance with. It configures the hub with the necessary access polices, routes, and consumer group. |
ARM template resource definition
The accounts/instances 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.DeviceUpdate/accounts/instances resource, add the following JSON to your template.
{
"type": "Microsoft.DeviceUpdate/accounts/instances",
"apiVersion": "2023-07-01",
"name": "string",
"location": "string",
"properties": {
"diagnosticStorageProperties": {
"authenticationType": "string",
"connectionString": "string",
"resourceId": "string"
},
"enableDiagnostics": "bool",
"iotHubs": [
{
"resourceId": "string"
}
]
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.DeviceUpdate/accounts/instances
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2023-07-01' |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 36 Pattern = ^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$ (required) |
| properties | Device Update instance properties. | InstanceProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.DeviceUpdate/accounts/instances' |
DiagnosticStorageProperties
| Name | Description | Value |
|---|---|---|
| authenticationType | Authentication Type | 'KeyBased' (required) |
| connectionString | ConnectionString of the diagnostic storage account | string Constraints: Sensitive value. Pass in as a secure parameter. |
| resourceId | ResourceId of the diagnostic storage account | string (required) |
InstanceProperties
| Name | Description | Value |
|---|---|---|
| diagnosticStorageProperties | Customer-initiated diagnostic log collection storage properties | DiagnosticStorageProperties |
| enableDiagnostics | Enables or Disables the diagnostic logs collection | bool |
| iotHubs | List of IoT Hubs associated with the account. | IotHubSettings[] |
IotHubSettings
| Name | Description | Value |
|---|---|---|
| resourceId | IoTHub resource ID | string Constraints: Min length = 108 Max length = 244 (required) |
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Create Device Update for IoT Hub account, instance, IoT Hub |
This template creates an account, and an instance and a hub to link the instance with. It configures the hub with the necessary access polices, routes, and consumer group. |
Terraform (AzAPI provider) resource definition
The accounts/instances 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.DeviceUpdate/accounts/instances resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DeviceUpdate/accounts/instances@2023-07-01"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
diagnosticStorageProperties = {
authenticationType = "string"
connectionString = "string"
resourceId = "string"
}
enableDiagnostics = bool
iotHubs = [
{
resourceId = "string"
}
]
}
}
}
Property Values
Microsoft.DeviceUpdate/accounts/instances
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 36 Pattern = ^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$ (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: accounts |
| properties | Device Update instance properties. | InstanceProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.DeviceUpdate/accounts/instances@2023-07-01" |
DiagnosticStorageProperties
| Name | Description | Value |
|---|---|---|
| authenticationType | Authentication Type | 'KeyBased' (required) |
| connectionString | ConnectionString of the diagnostic storage account | string Constraints: Sensitive value. Pass in as a secure parameter. |
| resourceId | ResourceId of the diagnostic storage account | string (required) |
InstanceProperties
| Name | Description | Value |
|---|---|---|
| diagnosticStorageProperties | Customer-initiated diagnostic log collection storage properties | DiagnosticStorageProperties |
| enableDiagnostics | Enables or Disables the diagnostic logs collection | bool |
| iotHubs | List of IoT Hubs associated with the account. | IotHubSettings[] |
IotHubSettings
| Name | Description | Value |
|---|---|---|
| resourceId | IoTHub resource ID | string Constraints: Min length = 108 Max length = 244 (required) |
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Terraform Samples
A basic example of deploying IoT Hub Device Update 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" "account" {
type = "Microsoft.DeviceUpdate/accounts@2022-10-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
publicNetworkAccess = "Enabled"
sku = "Standard"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "IotHub" {
type = "Microsoft.Devices/IotHubs@2022-04-30-preview"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
cloudToDevice = {
}
enableFileUploadNotifications = false
messagingEndpoints = {
}
routing = {
fallbackRoute = {
condition = "true"
endpointNames = [
"events",
]
isEnabled = true
source = "DeviceMessages"
}
}
storageEndpoints = {
}
}
sku = {
capacity = 1
name = "S1"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "instance" {
type = "Microsoft.DeviceUpdate/accounts/instances@2022-10-01"
parent_id = azapi_resource.account.id
name = var.resource_name
location = var.location
body = {
properties = {
accountName = azapi_resource.account.name
enableDiagnostics = false
iotHubs = [
{
resourceId = azapi_resource.IotHub.id
},
]
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}