DigitalTwinsClient.DeleteDigitalTwin Method
Definition
Important
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.
Deletes a digital twin synchronously.
public virtual Azure.Response DeleteDigitalTwin (string digitalTwinId, Azure.ETag? ifMatch = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteDigitalTwin : string * Nullable<Azure.ETag> * System.Threading.CancellationToken -> Azure.Response
override this.DeleteDigitalTwin : string * Nullable<Azure.ETag> * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function DeleteDigitalTwin (digitalTwinId As String, Optional ifMatch As Nullable(Of ETag) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response
Parameters
- digitalTwinId
- String
The Id of the digital twin to delete.
Optional. Only perform the operation if the entity's ETag matches this optional ETag or * (All) is provided.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
The HTTP response Response.
Exceptions
The exception that captures the errors from the service. Check the ErrorCode and Status properties for more details.
The exception is thrown when digitalTwinId
is null
.
Remarks
To delete a digital twin, any relationships referencing it must be deleted first.
For more samples, see our repo samples.