BreakContainerLease

The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.

The Lease Blob operation can be called in one of five modes:

  • Acquire, to request a new lease.

  • Renew, to renew an existing lease.

  • Change, to change the ID of an existing lease.

  • Release, to free the lease if it is no longer needed so that another client may immediately acquire a lease against the blob.

  • Break, to end the lease but ensure that another client cannot acquire a new lease until the current lease period has expired.


Properties

Azure Storage Credential

  • Account Name - The name of your Azure storage account.
  • Access Key - Your Azure account access key.
  • EndpointSuffix - To create a connection string for a storage service in a specific region.
  • BlobStorageUri - The Uri to the location of the Blob storage you want to access.
    • PrimaryUri and SecondaryUri settings available
  • FileStorageUri - The Uri to the location of the File storage you want to access.
    • PrimaryUri and SecondaryUri settings available
  • TableStorageUri - The Uri to the location of the Table storage you want to access.
    • PrimaryUri and SecondaryUri settings available
  • QueueStorageUri - The Uri to the location of the Queue storage you want to access.
    • PrimaryUri and SecondaryUri settings available

Container name

The container name. To break a lease for the root container, specify $root as the name.

Lease time

Number of seconds to allow the lease to remain. If specified, this must be between 0 and 60 seconds. It will be used only if it is shorter than the time remaining on the lease. If not specified, the break period is the remainder of the current lease, or 0 for infinite leases.

Lease id

Specifies a lease id that must match the lease on a container.

If modified since time

Specifies a DateTime value in ISO 8061 format for a condition specifying a time since which the container has been modified. Do not use simultaneously with If not modified since time property.

If not modified since time

Specifies a DateTime value in ISO 8061 format for a condition specifying a time since which the container has not been modified. Do not use simultaneously with If modified since time property.


Also See

Please refer to the following Azure API reference documentation:

Configure Azure Storage connection strings:

https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.auth.storagecredentials.-ctor?view=azure-dotnet#Microsoft_Azure_Storage_Auth_StorageCredentials__ctor_System_String_System_String_

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.cloudstorageaccount.-ctor?view=azure-dotnet#Microsoft_Azure_Storage_CloudStorageAccount__ctor_Microsoft_Azure_Storage_Auth_StorageCredentials_System_String_System_Boolean_

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.cloudstorageaccount.-ctor?view=azure-dotnet#Microsoft_Azure_Storage_CloudStorageAccount__ctor_Microsoft_Azure_Storage_Auth_StorageCredentials_Microsoft_Azure_Storage_StorageUri_Microsoft_Azure_Storage_StorageUri_Microsoft_Azure_Storage_StorageUri_Microsoft_Azure_Storage_StorageUri_

Documentation to assist in setting properties:

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.accesscondition?view=azure-dotnet

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.blob.cloudblobcontainer.breaklease?view=azure-dotnet

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.blob.cloudblobclient.getcontainerreference?view=azure-dotnet

https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob