Twins Client. Create Models Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates one or many models synchronously.
public virtual Azure.Response<Azure.DigitalTwins.Core.DigitalTwinsModelData> CreateModels (System.Collections.Generic.IEnumerable<string> dtdlModels, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateModels : seq<string> * System.Threading.CancellationToken -> Azure.Response<Azure.DigitalTwins.Core.DigitalTwinsModelData> override this.CreateModels : seq<string> * System.Threading.CancellationToken -> Azure.Response<Azure.DigitalTwins.Core.DigitalTwinsModelData>
Public Overridable Function CreateModels (dtdlModels As IEnumerable(Of String), Optional cancellationToken As CancellationToken = Nothing) As Response(Of DigitalTwinsModelData())
The set of models conforming to Digital Twins Definition Language (DTDL) v2 to create. Each string corresponds to exactly one model.
The cancellation token.
The created models and the http response Response<T>.
Bulk model creation is useful when several models have references to each other. It simplifies creation for the client because otherwise the models would have to be created in a very specific order. The service evaluates all models to ensure all references are satisfied, and then accepts or rejects the set. So using this method, model creation is transactional.
For more samples, see our repo samples.