共用方式為


ImportMode Enum

Definition

Identifies the behavior when merging a device to the registry during import actions.

[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public enum ImportMode
[<Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))>]
type ImportMode = 
Public Enum ImportMode
Inheritance
ImportMode
Attributes
Newtonsoft.Json.JsonConverterAttribute

Fields

Name Value Description
CreateOrUpdate 0

If a device does not exist with the specified Id, it is newly registered. If the device already exists, existing information is overwritten with the provided input data without regard to the ETag value.

Create 1

If a device does not exist with the specified Id, it is newly registered. If the device already exists, an error is written to the log file.

Update 2

If a device already exists with the specified Id, existing information is overwritten with the provided input data without regard to the ETag value. If the device does not exist, an error is written to the log file.

UpdateIfMatchETag 3

If a device already exists with the specified Id, existing information is overwritten with the provided input data only if there is an ETag match. If the device does not exist, or there is an ETag mismatch, an error is written to the log file.

CreateOrUpdateIfMatchETag 4

If a device does not exist with the specified Id, it is newly registered. If the device already exists, existing information is overwritten with the provided input data only if there is an ETag match. If there is an ETag mismatch, an error is written to the log file.

Delete 5

If a device already exists with the specified Id, it is deleted without regard to the ETag value. If the device does not exist, an error is written to the log file.

DeleteIfMatchETag 6

If a device already exists with the specified Id, it is deleted only if there is an ETag match. If the device does not exist, an error is written to the log file. If there is an ETag mismatch, an error is written to the log file.

UpdateTwin 7

If a twin already exists with the specified Id, existing information is overwritten with the provided input data without regard to the ETag value.

UpdateTwinIfMatchETag 8

If a twin already exists with the specified Id, existing information is overwritten with the provided input data only if there is an ETag match. The twin's ETag, is processed independently from the device's ETag. If there is a mismatch with the existing twin's ETag, an error is written to the log file.

Applies to