Table of Contents

Class ReleaseLockRequestOptions

Namespace
Azure.Iot.Operations.Services.LeasedLock
Assembly
Azure.Iot.Operations.Services.dll

Optional fields for a release lock request.

public class ReleaseLockRequestOptions
Inheritance
ReleaseLockRequestOptions
Inherited Members

Properties

CancelAutomaticRenewal

If true, this operation will also stop any auto-renewing configured by AutomaticRenewalOptions. If false, any auto-renewing will continue as-is.

public bool CancelAutomaticRenewal { get; set; }

Property Value

bool

Remarks

By default, auto-renewal will be cancelled.

SessionId

The optional value to include in the lock's value.

public string? SessionId { get; set; }

Property Value

string

Remarks

Only provide this value if the sessionId was set when acquiring the lock in SessionId. If the sessionId was set when acquiring the lock, but not when releasing the lock (or vice versa), then attempts to release the lock will fail.

By providing a unique sessionId, an application can use the same holderName and/or the same MQTT client in different threads to acquire the same lock without worrying about accidentally allowing two clients to both own a lock at the same time.