Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Ability to acquire a Storage Account Blob lease #27068

Open
danielfears opened this issue Feb 4, 2025 · 3 comments
Open

[Feature]: Ability to acquire a Storage Account Blob lease #27068

danielfears opened this issue Feb 4, 2025 · 3 comments
Assignees
Labels
customer-reported feature-request This issue requires a new behavior in the product in order be resolved. needs-author-feedback More information is needed from author to address the issue. Service Attention This issue is responsible by Azure service team. Storage

Comments

@danielfears
Copy link

Description of the new feature

I would like the ability to create and acquire a lease for a Storage Account Blob object, as currently there is only support to do this using the Azure CLI, .NET, Java, JavaScript and Python, but not directly and natively via a PowerShell command.

By CLI: https://learn.microsoft.com/en-us/cli/azure/storage/blob/lease?view=azure-cli-latest
By other language: https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-lease

By PowerShell: ?

Proposed implementation details (optional)

To leverage a command like New-AzStorageBlobLease to target an existing blob within a Storage Account and create a lease lock on that object.

Example usage: New-AzStorageBlobLease -Blob $blobName -Container $containerName -Context $context -LeaseDuration $leaseDuration

@danielfears danielfears added feature-request This issue requires a new behavior in the product in order be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Feb 4, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported needs-triage This is a new issue that needs to be triaged to the appropriate team. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Feb 4, 2025
@steevaavoo
Copy link

This would be most welcome. Feature parity is always desirable.

@blueww blueww self-assigned this Feb 5, 2025
@blueww
Copy link
Member

blueww commented Feb 5, 2025

@danielfears

You can always use .net SDK API in Powershell to do any functionality supported by SDK but not in PSH cmdlet:
Following is a sample:

$blob = Get-AzStorageBlob -Container $containerName -Context $ctx -Blob $blobName

$blobLease = New-Object Azure.Storage.Blobs.Specialized.BlobLeaseClient -ArgumentList $blob.BlobBaseClient,$leaseID
$bl.Acquire((New-TimeSpan -Seconds 30))

@isra-fel isra-fel added Storage Service Attention This issue is responsible by Azure service team. needs-author-feedback More information is needed from author to address the issue. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Feb 13, 2025
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported feature-request This issue requires a new behavior in the product in order be resolved. needs-author-feedback More information is needed from author to address the issue. Service Attention This issue is responsible by Azure service team. Storage
Projects
None yet
Development

No branches or pull requests

4 participants