Namespace Discovered Devices - Create Or Replace

NamespaceDiscoveredDevice oluşturma

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}/discoveredDevices/{discoveredDeviceName}?api-version=2026-04-01

URI Parametreleri

Name İçinde Gerekli Tür Description
discoveredDeviceName
path True

string

minLength: 3
maxLength: 63
pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$

Bulunan cihazın adı.

namespaceName
path True

string

minLength: 3
maxLength: 64
pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$

Ad alanının adı.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Kaynak grubunun adı. Ad büyük/küçük harfe duyarsız.

subscriptionId
path True

string (uuid)

Hedef aboneliğin kimliği. Değer bir UUID olmalıdır.

api-version
query True

string

minLength: 1

Bu işlem için kullanılacak API sürümü.

İstek Gövdesi

Name Gerekli Tür Description
extendedLocation True

ExtendedLocation

Genişletilmiş konum.

location True

string

Kaynağın bulunduğu coğrafi konum

properties.discoveryId True

string

Bulunan cihazdaki değişiklikleri algılamak için kullanılan tanımlayıcı.

properties.version True

integer (int64)

Kaynak her değiştirildiğinde artırılan bir tamsayı.

properties.attributes

Özel öznitelikler içeren bir anahtar-değer çiftleri kümesi.

properties.endpoints

DiscoveredMessagingEndpoints

Bulunan cihazlar için uç noktalar.

properties.externalDeviceId

string

Azure dışındaki bir sistemdeki cihazı temsil eden cihaz kimliği. Azure kiracısı kapsamında benzersiz.

properties.manufacturer

string

Cihaz üreticisi.

properties.model

string

Cihaz modeli.

properties.operatingSystem

string

Cihaz işletim sistemi adı.

properties.operatingSystemVersion

string

Cihaz işletim sistemi sürümü.

tags

object

Kaynak etiketleri.

Yanıtlar

Name Tür Description
200 OK

NamespaceDiscoveredDevice

Kaynak 'NamespaceDiscoveredDevice' güncelleştirme işlemi başarılı oldu

201 Created

NamespaceDiscoveredDevice

Kaynak 'NamespaceDiscoveredDevice' oluşturma işlemi başarılı oldu

Üst Bilgiler

  • Azure-AsyncOperation: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

Beklenmeyen bir hata yanıtı.

Güvenlik

azure_auth

Azure Active Directory OAuth2 Akışı.

Tür: oauth2
Akış: implicit
Yetkilendirme URL’si: https://login.microsoftonline.com/common/oauth2/authorize

Kapsamlar

Name Description
user_impersonation kullanıcı hesabınızın kimliğine bürünme

Örnekler

CreateOrReplace_NamespaceDiscoveredDevice

Örnek isteği

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/namespaces/my-namespace-1/discoveredDevices/my-discovereddevice-1?api-version=2026-04-01

{
  "location": "West Europe",
  "extendedLocation": {
    "type": "CustomLocation",
    "name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"
  },
  "tags": {
    "site": "building-1"
  },
  "properties": {
    "endpoints": {
      "outbound": {
        "assigned": {
          "eventGridEndpoint": {
            "endpointType": "Microsoft.Devices/IoTHubs",
            "address": "https://myeventgridtopic.westeurope-1.eventgrid.azure.net/api/events"
          }
        }
      }
    },
    "discoveryId": "discoveryId1",
    "version": 1
  }
}

Örnek yanıt

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/namespaces/my-namespace-1/discoveredDevices/my-discovereddevice-1",
  "name": "my-discovereddevice-1",
  "type": "Microsoft.DeviceRegistry/namespaces/discoveredDevices",
  "location": "West Europe",
  "extendedLocation": {
    "type": "CustomLocation",
    "name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"
  },
  "tags": {
    "site": "building-1"
  },
  "systemData": {
    "createdBy": "2ta23112-4596-44ff-b773-19405922bfc1",
    "createdByType": "Application",
    "createdAt": "2022-11-16T00:36:43.2516899Z",
    "lastModifiedBy": "2ta23112-4596-44ff-b773-19405922bfc1",
    "lastModifiedByType": "Application",
    "lastModifiedAt": "2022-11-16T01:37:16.0922793Z"
  },
  "properties": {
    "endpoints": {
      "outbound": {
        "assigned": {
          "eventGridEndpoint": {
            "endpointType": "Microsoft.Devices/IoTHubs",
            "address": "https://myeventgridtopic.westeurope-1.eventgrid.azure.net/api/events"
          }
        }
      }
    },
    "discoveryId": "discoveryId1",
    "version": 1,
    "provisioningState": "Succeeded"
  }
}
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/namespaces/my-namespace-1/discoveredDevices/my-discovereddevice-1",
  "name": "my-discovereddevice-1",
  "type": "Microsoft.DeviceRegistry/namespaces/discoveredDevices",
  "location": "West Europe",
  "extendedLocation": {
    "type": "CustomLocation",
    "name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"
  },
  "tags": {
    "site": "building-1"
  },
  "systemData": {
    "createdBy": "2ta23112-4596-44ff-b773-19405922bfc1",
    "createdByType": "Application",
    "createdAt": "2022-11-16T00:36:43.2516899Z",
    "lastModifiedBy": "2ta23112-4596-44ff-b773-19405922bfc1",
    "lastModifiedByType": "Application",
    "lastModifiedAt": "2022-11-16T01:37:16.0922793Z"
  },
  "properties": {
    "endpoints": {
      "outbound": {
        "assigned": {
          "eventGridEndpoint": {
            "endpointType": "Microsoft.Devices/IoTHubs",
            "address": "https://myeventgridtopic.westeurope-1.eventgrid.azure.net/api/events"
          }
        }
      }
    },
    "discoveryId": "discoveryId1",
    "version": 1,
    "provisioningState": "Accepted"
  }
}

Tanımlar

Name Description
AuthenticationMethod

Sunucudaki istemcinin kullanıcısının kimliğini doğrulama yöntemi.

createdByType

Kaynağı oluşturan kimliğin türü.

DeviceMessagingEndpoint

Cihaz mesajlaşma uç noktası modeli.

DiscoveredInboundEndpoints

Cihaza bağlanmak için bir uç nokta.

DiscoveredMessagingEndpoints

Bir cihazın bir hizmete bağlanmak için kullanabileceği bağlantı uç noktası URL'si.

DiscoveredOutboundEndpoints

Özellik paketi cihazın giden uç noktalarını içerir

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

ErrorDetail

Hata ayrıntısı.

ErrorResponse

Hata yanıtı

ExtendedLocation

Genişletilmiş konum.

NamespaceDiscoveredDevice

Bulunan cihaz tanımı.

ProvisioningState

Kaynağın sağlama durumu.

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

AuthenticationMethod

Sunucudaki istemcinin kullanıcısının kimliğini doğrulama yöntemi.

Değer Description
Anonymous

Kullanıcı kimlik doğrulama yöntemi anonimdir.

Certificate

Kullanıcı kimlik doğrulama yöntemi bir x509 sertifikasıdır.

UsernamePassword

Kullanıcı kimlik doğrulama yöntemi bir kullanıcı adı ve paroladır.

createdByType

Kaynağı oluşturan kimliğin türü.

Değer Description
User
Application
ManagedIdentity
Key

DeviceMessagingEndpoint

Cihaz mesajlaşma uç noktası modeli.

Name Tür Description
address

string

Bağlanılacak uç nokta adresi.

endpointType

string

Mesajlaşma uç noktası için kullanılan bağlantı türü.

DiscoveredInboundEndpoints

Cihaza bağlanmak için bir uç nokta.

Name Tür Description
additionalConfiguration

string

Bağlayıcı tarafından kullanılacak yapılandırmayı içeren dizeleştirilmiş JSON (ör. OPC UA, ONVIF).

address

string

Uç nokta adresi ve bağlantı noktası. Bu bir IP adresi (ör. 192.168.1.1) veya tam nitelikli bir alan adı (FQDN, ör. server.example.com) olabilir.

endpointType

string

Bağlantı uç noktasının türü.

lastUpdatedOn

string (date-time)

Uç noktanın bulunduğu zaman damgası (UTC cinsinden).

supportedAuthenticationMethods

AuthenticationMethod[]

Gelen bağlantılar için cihaz tarafından desteklenen desteklenen kimlik doğrulama yöntemlerinin listesi.

version

string

Uç noktayla ilişkili protokol sürümü, örneğin endpointType, Microsoft.HTTP için 1 veya 2 ve endpointType, Microsoft.Mqtt vb. için 3.5 veya 5.0.

DiscoveredMessagingEndpoints

Bir cihazın bir hizmete bağlanmak için kullanabileceği bağlantı uç noktası URL'si.

Name Tür Description
inbound

<string,  DiscoveredInboundEndpoints>

Cihaza bağlanmak için uç nokta kümesi.

outbound

DiscoveredOutboundEndpoints

Bir cihazın bağlanabileceği uç noktalar kümesi.

DiscoveredOutboundEndpoints

Özellik paketi cihazın giden uç noktalarını içerir

Name Tür Description
assigned

<string,  DeviceMessagingEndpoint>

Cihazın bağlanabileceği uç noktalar.

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

Name Tür Description
info

object

Ek bilgiler.

type

string

Ek bilgi türü.

ErrorDetail

Hata ayrıntısı.

Name Tür Description
additionalInfo

ErrorAdditionalInfo[]

Hata ek bilgileri.

code

string

Hata kodu.

details

ErrorDetail[]

Hata ayrıntıları.

message

string

Hata iletisi.

target

string

Hata hedefi.

ErrorResponse

Hata yanıtı

Name Tür Description
error

ErrorDetail

Hata nesnesi.

ExtendedLocation

Genişletilmiş konum.

Name Tür Description
name

string

Genişletilmiş konum adı.

type

string

Genişletilmiş konum türü.

NamespaceDiscoveredDevice

Bulunan cihaz tanımı.

Name Tür Description
extendedLocation

ExtendedLocation

Genişletilmiş konum.

id

string (arm-id)

Kaynağın tam kaynak kimliği. Örneğin "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

location

string

Kaynağın bulunduğu coğrafi konum

name

string

Kaynağın adı

properties.attributes

Özel öznitelikler içeren bir anahtar-değer çiftleri kümesi.

properties.discoveryId

string

Bulunan cihazdaki değişiklikleri algılamak için kullanılan tanımlayıcı.

properties.endpoints

DiscoveredMessagingEndpoints

Bulunan cihazlar için uç noktalar.

properties.externalDeviceId

string

Azure dışındaki bir sistemdeki cihazı temsil eden cihaz kimliği. Azure kiracısı kapsamında benzersiz.

properties.manufacturer

string

Cihaz üreticisi.

properties.model

string

Cihaz modeli.

properties.operatingSystem

string

Cihaz işletim sistemi adı.

properties.operatingSystemVersion

string

Cihaz işletim sistemi sürümü.

properties.provisioningState

ProvisioningState

Kaynağın sağlama durumu.

properties.version

integer (int64)

Kaynak her değiştirildiğinde artırılan bir tamsayı.

systemData

systemData

createdBy ve modifiedBy bilgilerini içeren Azure Resource Manager meta verileri.

tags

object

Kaynak etiketleri.

type

string

Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts"

ProvisioningState

Kaynağın sağlama durumu.

Değer Description
Succeeded

Kaynak oluşturuldu.

Failed

Kaynak oluşturulamadı.

Canceled

Kaynak oluşturma işlemi iptal edildi.

Accepted

Kaynak sunucu tarafından kabul edildi.

Deleting

Kaynak siliniyor.

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

Name Tür Description
createdAt

string (date-time)

Kaynak oluşturma (UTC) zaman damgası.

createdBy

string

Kaynağı oluşturan kimlik.

createdByType

createdByType

Kaynağı oluşturan kimliğin türü.

lastModifiedAt

string (date-time)

Kaynağın son değişikliğinin zaman damgası (UTC)

lastModifiedBy

string

Kaynağı en son değiştiren kimlik.

lastModifiedByType

createdByType

Kaynağı en son değiştiren kimlik türü.