Bulk Registry - Update Registry

IoT Hub kimlik kayıt defterinden birden çok cihazın kimliklerini oluşturur, güncelleştirir veya siler. Cihaz kimliği listede yalnızca bir kez belirtilebilir. Farklı cihazlarda farklı işlemlere (oluşturma, güncelleştirme, silme) izin verilir. Çağrı başına en fazla 100 cihaz belirtilebilir. Büyük ölçekli işlemler için blob depolama ()https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities kullanarak içeri aktarma özelliğini kullanın.

POST https://fully-qualified-iothubname.azure-devices.net/devices?api-version=2020-05-31-preview

URI Parametreleri

Name İçinde Gerekli Tür Description
api-version
query True

string

Api sürümü.

İstek Gövdesi

Name Tür Description
devices

ExportImportDevice[]

Gerçekleştirilecek kayıt defteri işlemleri.

Yanıtlar

Name Tür Description
200 OK

BulkRegistryOperationResult

Tamam ögesini seçin.

400 Bad Request

BulkRegistryOperationResult

Hatalı İstek.

Tanımlar

Name Description
AuthenticationMechanism
BulkRegistryOperationResult

Toplu kayıt defteri işleminin sonucu.

DeviceCapabilities

Cihazda etkinleştirilen özelliklerin durumu.

DeviceRegistryOperationError

Cihaz kayıt defteri işlemi hata ayrıntıları.

DeviceRegistryOperationWarning

Cihaz kayıt defteri işlemi uyarı ayrıntıları.

ExportImportDevice
PropertyContainer

İkizin istenen ve bildirilen özellikleri. Nesnenin maksimum derinliği 10'dur.

SymmetricKey
X509Thumbprint

AuthenticationMechanism

Name Tür Description
symmetricKey

SymmetricKey

SAS tabanlı kimlik doğrulaması için kullanılan birincil ve ikincil anahtarlar.

type enum:
  • certificateAuthority
  • none
  • sas
  • selfSigned

Hizmete bağlanmak için kullanılan kimlik doğrulama türü.

x509Thumbprint

X509Thumbprint

x509 tabanlı kimlik doğrulaması için kullanılan birincil ve ikincil x509 parmak izleri.

BulkRegistryOperationResult

Toplu kayıt defteri işleminin sonucu.

Name Tür Description
errors

DeviceRegistryOperationError[]

Cihaz kayıt defteri işlemi hataları.

isSuccessful

boolean

İşlem sonucu.

warnings

DeviceRegistryOperationWarning[]

Cihaz kayıt defteri işlemi uyarıları.

DeviceCapabilities

Cihazda etkinleştirilen özelliklerin durumu.

Name Tür Description
iotEdge

boolean

Cihazın bir uç cihaz olup olmadığını belirleyen özellik.

DeviceRegistryOperationError

Cihaz kayıt defteri işlemi hata ayrıntıları.

Name Tür Description
deviceId

string

Cihazın benzersiz tanımlayıcısı.

errorCode enum:
  • AmqpAddressNotFound
  • ApplyConfigurationAlreadyInProgressOnDevice
  • ArgumentInvalid
  • ArgumentNull
  • AsyncOperationNotFound
  • AzureStorageTimeout
  • AzureTableStoreError
  • AzureTableStoreNotFound
  • BackupTimedOut
  • BlobContainerValidationError
  • BulkAddDevicesNotSupported
  • BulkRegistryOperationFailure
  • CallbackSubscriptionConflict
  • CannotModifyImmutableConfigurationContent
  • CannotRegisterModuleToModule
  • CertificateAuthorityConflict
  • CertificateAuthorityNotFound
  • CertificateNotFound
  • CheckpointStoreNotFound
  • ClientClosedRequest
  • ConfigReadFailed
  • ConfigurationAlreadyExists
  • ConfigurationCountLimitExceeded
  • ConfigurationNotAvailable
  • ConfigurationNotFound
  • ConnectionForcefullyClosed
  • ConnectionForcefullyClosedOnFaultInjection
  • ConnectionForcefullyClosedOnNewConnection
  • ConnectionRejectedOnFaultInjection
  • ConnectionUnavailable
  • CustomAllocationFailed
  • CustomAllocationIotHubNotSpecified
  • CustomAllocationUnauthorizedAccess
  • DefaultStorageEndpointNotConfigured
  • DeserializationError
  • DeviceAlreadyExists
  • DeviceConnectionClosedRemotely
  • DeviceDefinedMultipleTimes
  • DeviceGroupConflict
  • DeviceGroupNotFound
  • DeviceInvalidResultCount
  • DeviceJobAlreadyExists
  • DeviceLocked
  • DeviceMaximumActiveFileUploadLimitExceeded
  • DeviceMaximumQueueDepthExceeded
  • DeviceMaximumQueueSizeExceeded
  • DeviceMessageLockLost
  • DeviceModelMaxIndexablePropertiesExceeded
  • DeviceModelMaxPropertiesExceeded
  • DeviceNotFound
  • DeviceNotOnline
  • DeviceRecordConflict
  • DeviceRecordNotFound
  • DeviceRegistrationNotFound
  • DeviceStorageEntitySerializationError
  • DeviceThrottlingLimitExceeded
  • DeviceUnavailable
  • DigitalTwinInterfaceNotFound
  • DigitalTwinModelAlreadyExists
  • DigitalTwinModelCountLimitExceeded
  • DigitalTwinModelExistsWithOtherModelType
  • DigitalTwinModelNotFound
  • DocumentDbInvalidReturnValue
  • ElasticPoolNotFound
  • ElasticPoolTenantHubNotFound
  • EnrollmentConflict
  • EnrollmentGroupConflict
  • EnrollmentGroupNotFound
  • EnrollmentNotFound
  • EtagDoesNotMatch
  • EventHubLinkAlreadyClosed
  • ExpiredFileUploadCorrelationId
  • FeatureNotSupported
  • GatewayTimeout
  • GenericBadGateway
  • GenericBadRequest
  • GenericConflict
  • GenericForbidden
  • GenericGatewayTimeout
  • GenericMethodNotAllowed
  • GenericNotFound
  • GenericPreconditionFailed
  • GenericRequestEntityTooLarge
  • GenericServerError
  • GenericServiceUnavailable
  • GenericTimeout
  • GenericTooManyRequests
  • GenericUnauthorized
  • GenericUnsupportedMediaType
  • GroupNotAvailable
  • GroupNotFound
  • GroupRecordConflict
  • GroupRecordNotFound
  • HostingServiceNotAvailable
  • ImportDevicesNotSupported
  • ImportWarningExistsError
  • IncompatibleDataType
  • InflightMessagesInLink
  • InterfaceNameCompressionModelCountLimitExceeded
  • InterfaceNameModelAlreadyExists
  • InterfaceNameModelNotFound
  • InvalidBlobState
  • InvalidConfigurationContent
  • InvalidConfigurationCustomMetricsQuery
  • InvalidConfigurationTargetCondition
  • InvalidContainerReceiveLink
  • InvalidContentEncodingOrType
  • InvalidDeviceScope
  • InvalidDigitalTwinJsonPatch
  • InvalidDigitalTwinPatch
  • InvalidDigitalTwinPatchPath
  • InvalidDigitalTwinPayload
  • InvalidEndorsementKey
  • InvalidEndpointAuthenticationType
  • InvalidEnrollmentGroupId
  • InvalidErrorCode
  • InvalidFileUploadCompletionStatus
  • InvalidFileUploadCorrelationId
  • InvalidMessageExpiryTime
  • InvalidMessagingEndpoint
  • InvalidOperation
  • InvalidPartitionEpoch
  • InvalidPnPDesiredProperties
  • InvalidPnPInterfaceDefinition
  • InvalidPnPReportedProperties
  • InvalidPnPWritableReportedProperties
  • InvalidProtocolVersion
  • InvalidRegistrationId
  • InvalidResponseWhileProxying
  • InvalidRouteTestInput
  • InvalidSchemaVersion
  • InvalidSourceOnRoute
  • InvalidStorageEndpoint
  • InvalidStorageEndpointOrBlob
  • InvalidStorageEndpointProperty
  • InvalidStorageRootKey
  • InvalidThrottleParameter
  • IotDpsSuspended
  • IotDpsSuspending
  • IotHubActivationFailed
  • IotHubFailingOver
  • IotHubFormatError
  • IotHubMaxCbsTokenExceeded
  • IotHubNotFound
  • IotHubQuotaExceeded
  • IotHubRestoring
  • IotHubSuspended
  • IotHubUnauthorized
  • IotHubUnauthorizedAccess
  • JobAlreadyExists
  • JobCancelled
  • JobNotFound
  • JobQuotaExceeded
  • JobRunPreconditionFailed
  • KeyEncryptionKeyRevoked
  • LinkCreationConflict
  • LinkedHubConflict
  • LinkedHubNotFound
  • ManagedIdentityNotEnabled
  • MessageTooLarge
  • ModelAlreadyExists
  • ModelRepoEndpointError
  • ModuleAlreadyExistsOnDevice
  • ModuleNotFound
  • NullMessage
  • OperationNotAllowedInCurrentState
  • OperationNotAvailableInCurrentTier
  • OrchestrationOperationFailed
  • OrphanDiscoveryDocument
  • PartitionNotFound
  • PreconditionFailed
  • ProvisioningRecordConflict
  • ProvisioningRecordNotFound
  • ProvisioningSettingsConflict
  • ProvisioningSettingsNotFound
  • QueryStoreClusterNotFound
  • QuotaMetricNotFound
  • ReceiveLinkOpensThrottled
  • RegistrationIdDefinedMultipleTimes
  • RegistrationStatusConflict
  • ReliableBlobStoreError
  • ReliableBlobStoreTimeoutError
  • ReliableDocDbStoreStoreError
  • RequestCanceled
  • RequestTimedOut
  • ResolutionError
  • RestoreTimedOut
  • RetryAttemptsExhausted
  • RoutingEndpointResponseForbidden
  • RoutingEndpointResponseNotFound
  • RoutingNotEnabled
  • SerializationError
  • ServerBusy
  • ServerError
  • ServiceUnavailable
  • StatisticsRetrievalError
  • StreamReservationFailure
  • SystemModuleModifyUnauthorizedAccess
  • SystemPropertyNotFound
  • TenantHubRoutingNotEnabled
  • ThrottleBacklogLimitExceeded
  • ThrottlingBacklogTimeout
  • ThrottlingException
  • ThrottlingMaxActiveJobCountExceeded
  • TooManyDevices
  • TooManyEnrollments
  • TooManyModulesOnDevice
  • UnableToCompressComponentInfo
  • UnableToCompressDiscoveryInfo
  • UnableToExpandComponentInfo
  • UnableToExpandDiscoveryInfo
  • UnableToFetchCredentials
  • UnableToFetchTenantInfo
  • UnableToShareIdentity
  • UnexpectedPropertyValue
  • UnsupportedOperationOnReplica

Hata kodu.

errorStatus

string

Hatanın ayrıntıları.

moduleId

string

Varsa, modülün benzersiz tanımlayıcısı.

operation

string

Başarısız olan işlemin türü.

DeviceRegistryOperationWarning

Cihaz kayıt defteri işlemi uyarı ayrıntıları.

Name Tür Description
deviceId

string

Cihazın benzersiz tanımlayıcısı.

warningCode enum:

DeviceRegisteredWithoutTwin

Uyarı kodu.

warningStatus

string

Uyarının ayrıntıları.

ExportImportDevice

Name Tür Description
authentication

AuthenticationMechanism

Modül tarafından kullanılan kimlik doğrulama mekanizması. Bu parametre isteğe bağlıdır ve sağlanmazsa varsayılan olarak SAS olarak ayarlanır. Bu durumda birincil/ikincil erişim anahtarları otomatik olarak oluşturulur.

capabilities

DeviceCapabilities

Cihazda etkinleştirilen özelliklerin durumu.

deviceScope

string

Cihazın kapsamı.

eTag

string

Cihaz için zayıf bir ETag'i temsil eden dize RFC7232. Değer yalnızca içeri aktarma modu updateIfMatchETag ise kullanılır, bu durumda içeri aktarma işlemi yalnızca bu ETag sunucu tarafından tutulan değerle eşleşiyorsa gerçekleştirilir.

id

string

Cihazın benzersiz tanımlayıcısı.

importMode enum:
  • create
  • delete
  • deleteIfMatchETag
  • update
  • updateIfMatchETag
  • updateTwin
  • updateTwinIfMatchETag

Kayıt defteri işleminin türü ve ETag tercihleri.

moduleId

string

Varsa, modülün benzersiz tanımlayıcısı.

properties

PropertyContainer

Cihaz için istenen ve bildirilen özellikler.

status enum:
  • disabled
  • enabled

Modülün durumu. Devre dışı bırakılırsa modül hizmete bağlanamaz.

statusReason

string

Cihaz kimliği durumunun nedenini depolayan 128 karakter uzunluğunda dize. Tüm UTF-8 karakterlerine izin verilir.

tags

object

Çözüm arka ucu tarafından okunan ve yazılan JSON belgesi. Etiketler cihaz uygulamalarına görünmez.

twinETag

string

Cihaz ikizi için zayıf bir ETag'i temsil eden dize RFC7232. Değer yalnızca içeri aktarma modu updateIfMatchETag ise kullanılır, bu durumda içeri aktarma işlemi yalnızca bu ETag sunucu tarafından tutulan değerle eşleşiyorsa gerçekleştirilir.

PropertyContainer

İkizin istenen ve bildirilen özellikleri. Nesnenin maksimum derinliği 10'dur.

Name Tür Description
desired

object

İstenen özellik anahtar-değer çiftlerinin koleksiyonu. Anahtarlar UTF-8 kodlu, büyük/küçük harfe duyarlı ve en fazla 1 KB uzunluğundadır. İzin verilen karakterler UNICODE denetim karakterlerini (C0 ve C1 kesimleri), '.', '$' ve boşluğu hariç tutar. İstenen porperty değerleri, uzunluğu 4 KB'a kadar olan JSON nesneleridir.

reported

object

Bildirilen özellik anahtar-değer çiftlerinin koleksiyonu. Anahtarlar UTF-8 kodlu, büyük/küçük harfe duyarlı ve en fazla 1 KB uzunluğundadır. İzin verilen karakterler UNICODE denetim karakterlerini (C0 ve C1 kesimleri), '.', '$' ve boşluğu hariç tutar. Bildirilen özellik değerleri, uzunluğu 4 KB'a kadar olan JSON nesneleridir.

SymmetricKey

Name Tür Description
primaryKey

string

Cihazın base64 ile kodlanmış birincil anahtarı.

secondaryKey

string

Cihazın base64 kodlanmış ikincil anahtarı.

X509Thumbprint

Name Tür Description
primaryThumbprint

string

X509 istemci sertifikası birincil parmak izi.

secondaryThumbprint

string

X509 istemci sertifikası ikincil parmak izi.