DigitalTwinsClient.DecommissionModel(String, CancellationToken) Method

Definition

Decommissions a model synchronously.

public virtual Azure.Response DecommissionModel (string modelId, System.Threading.CancellationToken cancellationToken = default);
abstract member DecommissionModel : string * System.Threading.CancellationToken -> Azure.Response
override this.DecommissionModel : string * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function DecommissionModel (modelId As String, Optional cancellationToken As CancellationToken = Nothing) As Response

Parameters

modelId
System.String

The Id of the model to decommission.

cancellationToken
System.Threading.CancellationToken

The cancellation token.

Returns

Response

The http response Response.

Exceptions

The exception that captures the errors from the service. Check the ErrorCode and Status properties for more details.

System.ArgumentNullException

The exception is thrown when modelId is null.

Remarks

When a model is decommissioned, new digital twins will no longer be able to be defined by this model. However, existing digital twins may continue to use this model. Once a model is decommissioned, it may not be recommissioned.

For more samples, see our repo samples.

Applies to

See also