Bulk Registry - Update Registry

IoT Hub ID レジストリから複数のデバイスの ID を作成、更新、または削除します。 デバイス ID は、一覧で 1 回だけ指定できます。 デバイスごとに異なる操作 (作成、更新、削除) が許可されます。 呼び出しごとに最大 100 台のデバイスを指定できます。 大規模な操作の場合は、BLOB ストレージ (https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities) を使用してインポート機能を使用します。

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

URI パラメーター

名前 / 必須 説明
api-version
query True

string

Api のバージョン。

要求本文

名前 説明
devices

ExportImportDevice[]

実行するレジストリ操作。

応答

名前 説明
200 OK

BulkRegistryOperationResult

OK です。

400 Bad Request

BulkRegistryOperationResult

正しくない要求。

定義

名前 説明
AuthenticationMechanism
BulkRegistryOperationResult

一括レジストリ操作の結果。

DeviceCapabilities

デバイスで有効になっている機能の状態。

DeviceRegistryOperationError

デバイス レジストリ操作エラーの詳細。

DeviceRegistryOperationWarning

デバイス レジストリ操作の警告の詳細。

ExportImportDevice
PropertyContainer

ツインの必要なプロパティと報告されたプロパティ。 オブジェクトの最大深度は 10 です。

SymmetricKey
X509Thumbprint

AuthenticationMechanism

名前 説明
symmetricKey

SymmetricKey

SAS ベースの認証に使用されるプライマリ キーとセカンダリ キー。

type enum:
  • certificateAuthority
  • none
  • sas
  • selfSigned

サービスへの接続に使用される認証の種類。

x509Thumbprint

X509Thumbprint

x509 ベースの認証に使用されるプライマリとセカンダリの x509 拇印。

BulkRegistryOperationResult

一括レジストリ操作の結果。

名前 説明
errors

DeviceRegistryOperationError[]

デバイス レジストリ操作エラー。

isSuccessful

boolean

操作結果。

warnings

DeviceRegistryOperationWarning[]

デバイス レジストリ操作の警告。

DeviceCapabilities

デバイスで有効になっている機能の状態。

名前 説明
iotEdge

boolean

デバイスがエッジ デバイスかどうかを決定する プロパティ。

DeviceRegistryOperationError

デバイス レジストリ操作エラーの詳細。

名前 説明
deviceId

string

デバイスの一意識別子。

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

エラー コード。

errorStatus

string

エラーの詳細。

moduleId

string

モジュールの一意識別子 (該当する場合)。

operation

string

失敗した操作の種類。

DeviceRegistryOperationWarning

デバイス レジストリ操作の警告の詳細。

名前 説明
deviceId

string

デバイスの一意識別子。

warningCode enum:

DeviceRegisteredWithoutTwin

警告コード。

warningStatus

string

警告の詳細。

ExportImportDevice

名前 説明
authentication

AuthenticationMechanism

モジュールで使用される認証メカニズム。 このパラメーターは省略可能であり、指定しない場合は既定で SAS になります。 その場合、プライマリ/セカンダリ アクセス キーが自動生成されます。

capabilities

DeviceCapabilities

デバイスで有効になっている機能の状態。

deviceScope

string

デバイスのスコープ。

eTag

string

デバイス RFC7232の弱い ETag を表す文字列。 この値は、インポート モードが updateIfMatchETag の場合にのみ使用されます。その場合、インポート操作は、この ETag がサーバーによって維持される値と一致する場合にのみ実行されます。

id

string

デバイスの一意識別子。

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

レジストリ操作の種類と ETag の基本設定。

moduleId

string

モジュールの一意識別子 (該当する場合)。

properties

PropertyContainer

デバイスの必要なプロパティと報告されるプロパティ。

status enum:
  • disabled
  • enabled

モジュールの状態。 無効にした場合、モジュールはサービスに接続できません。

statusReason

string

デバイス ID の状態の理由を格納する 128 文字の文字列。 すべての UTF-8 文字を使用できます。

tags

object

ソリューション バックエンドによって読み取られ、書き込まれた JSON ドキュメント。 タグはデバイス アプリには表示されません。

twinETag

string

デバイス ツイン RFC7232の弱い ETag を表す文字列。 この値は、インポート モードが updateIfMatchETag の場合にのみ使用されます。その場合、インポート操作は、この ETag がサーバーによって維持される値と一致する場合にのみ実行されます。

PropertyContainer

ツインの必要なプロパティと報告されたプロパティ。 オブジェクトの最大深度は 10 です。

名前 説明
desired

object

目的のプロパティ キーと値のペアのコレクション。 キーは UTF-8 でエンコードされ、大文字と小文字が区別され、最大 1 KB の長さです。 使用できる文字は、UNICODE 制御文字 (セグメント C0 および C1)、'.'、'$'、およびスペースを除外します。 必要な値は、最大 4 KB の長さの JSON オブジェクトです。

reported

object

報告されるプロパティのキーと値のペアのコレクション。 キーは UTF-8 でエンコードされ、大文字と小文字が区別され、最大 1 KB の長さです。 使用できる文字は、UNICODE 制御文字 (セグメント C0 および C1)、'.'、'$'、およびスペースを除外します。 報告されるプロパティ値は、最大 4 KB の長さの JSON オブジェクトです。

SymmetricKey

名前 説明
primaryKey

string

デバイスの base64 でエンコードされた主キー。

secondaryKey

string

デバイスの base64 でエンコードされたセカンダリ キー。

X509Thumbprint

名前 説明
primaryThumbprint

string

X509 クライアント証明書のプライマリ拇印。

secondaryThumbprint

string

X509 クライアント証明書のセカンダリ拇印。